Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.
ContestId |
Name |
Phase |
Frozen |
Duration (Seconds) |
Relative Time |
Start Time |
---|---|---|---|---|---|---|
95 | Codeforces Beta Round 77 (Div. 1 Only) | FINISHED | False | 7200 | 421685999 | July 8, 2011, 3 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 428 ) | D | Horse Races | PROGRAMMING | dp math | 2500 |
B"Petya likes horse racing very much. Horses numbered from l to r take part in the races. Petya wants to evaluate the probability of victory; for some reason, to do that he needs to know the amount of nearly lucky horses' numbers. A nearly lucky number is an integer number that has at least two lucky digits the distance between which does not exceed k. Petya learned from some of his mates from Lviv that lucky digits are digits 4 and 7. The distance between the digits is the absolute difference between their positions in the number of a horse. For example, if k xe2 x80 x89= xe2 x80 x892, then numbers 412395497, 404, 4070400000070004007 are nearly lucky and numbers 4, 4123954997, 4007000040070004007 are not. Petya prepared t intervals [li, xe2 x80 x89ri] and invented number k, common for all of them. Your task is to find how many nearly happy numbers there are in each of these segments. Since the answers can be quite large, output them modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). The first line contains two integers t and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89t, xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000) -- the number of segments and the distance between the numbers correspondingly. Next t lines contain pairs of integers li and ri (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89l xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89r xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89101000). All numbers are given without the leading zeroes. Numbers in each line are separated by exactly one space character. Output t lines. In each line print one integer -- the answer for the corresponding segment modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). In the first sample, the four nearly lucky numbers are 44, 47, 74, 77. In the second sample, only 74 and 77 are in the given segment."... |
Codeforces Beta Round #77 - Analysis |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
539528 | sankear | D | July 9, 2011, 1:36 p.m. | OK | Delphi | TESTS | 57 | 1880 | 93593600 | 2500 | |
1388093 | sillycross | D | March 23, 2012, 12:01 a.m. | OK | FPC | TESTS | 57 | 190 | 7372800 | 2500 | |
972831 | suanrong | D | Dec. 23, 2011, 9:35 a.m. | OK | FPC | TESTS | 57 | 200 | 18329600 | 2500 | |
538715 | xujie | D | July 9, 2011, 5:17 a.m. | OK | FPC | TESTS | 57 | 230 | 5836800 | 2500 | |
1153133 | zanoes | D | Feb. 6, 2012, 10:57 a.m. | OK | FPC | TESTS | 57 | 340 | 9216000 | 2500 | |
1745952 | landscape95 | D | May 31, 2012, 2:37 p.m. | OK | FPC | TESTS | 57 | 470 | 11468800 | 2500 | |
539648 | Sereja | D | July 9, 2011, 3:10 p.m. | OK | FPC | TESTS | 57 | 480 | 14233600 | 2500 | |
544163 | vlad107 | D | July 13, 2011, 10:10 a.m. | OK | FPC | TESTS | 57 | 610 | 11571200 | 2500 | |
1356384 | tmt514 | D | March 14, 2012, 6:26 a.m. | OK | GNU C++ | TESTS | 57 | 110 | 1433600 | 2500 | |
550310 | mj123 | D | July 18, 2011, 11:55 a.m. | OK | GNU C++ | TESTS | 57 | 110 | 1433600 | 2500 | |
950906 | peter50216 | D | Dec. 11, 2011, 4:49 a.m. | OK | GNU C++ | TESTS | 57 | 110 | 5427200 | 2500 | |
534808 | Imba | D | July 8, 2011, 4:04 p.m. | OK | GNU C++ | TESTS | 57 | 110 | 6348800 | 2500 | |
540336 | ACCEPT | D | July 10, 2011, 4:21 a.m. | OK | GNU C++ | TESTS | 57 | 130 | 1433600 | 2500 | |
552861 | meret | D | July 21, 2011, 6:20 a.m. | OK | GNU C++ | TESTS | 57 | 130 | 5427200 | 2500 | |
535637 | RAVEman | D | July 8, 2011, 4:28 p.m. | OK | GNU C++ | TESTS | 57 | 130 | 6451200 | 2500 | |
782055 | Meirambek | D | July 8, 2011, 3:01 p.m. | OK | GNU C++ | TESTS | 57 | 140 | 5529600 | 2500 | |
538050 | acherepanov | D | July 8, 2011, 8:32 p.m. | OK | GNU C++ | TESTS | 57 | 140 | 5529600 | 2500 | |
534913 | balroginfire | D | July 8, 2011, 4:07 p.m. | OK | GNU C++ | TESTS | 57 | 140 | 5529600 | 2500 | |
1130434 | Archon.JK | D | Feb. 1, 2012, 11:26 a.m. | OK | GNU C++0x | TESTS | 57 | 170 | 1433600 | 2500 | |
543320 | nk.karpov | D | July 12, 2011, 2:26 p.m. | OK | GNU C++0x | TESTS | 57 | 410 | 9830400 | 2500 | |
540817 | master3758 | D | July 10, 2011, 12:48 p.m. | OK | GNU C++0x | TESTS | 57 | 690 | 60313600 | 2500 | |
9501759 | raihatneloy | D | Jan. 22, 2015, 12:06 p.m. | OK | GNU C++0x | TESTS | 57 | 966 | 32563200 | 2500 | |
9346169 | sdya | D | Jan. 2, 2015, 1:12 p.m. | OK | GNU C++0x | TESTS | 57 | 1808 | 9728000 | 2500 | |
11233970 | k0st1a | D | May 23, 2015, 6:59 a.m. | OK | GNU C++11 | TESTS | 57 | 124 | 4198400 | 2500 | |
16746013 | Irkutsk_ISRU | D | March 16, 2016, 1:48 p.m. | OK | GNU C++11 | TESTS | 57 | 124 | 5017600 | 2500 | |
18720550 | RNS_CUS | D | June 25, 2016, 1:54 p.m. | OK | GNU C++11 | TESTS | 57 | 156 | 0 | 2500 | |
35565224 | mjhun | D | Feb. 22, 2018, 5:38 a.m. | OK | GNU C++11 | TESTS | 57 | 156 | 6451200 | 2500 | |
30125118 | ntu_vjudge_1 | D | Sept. 6, 2017, 7:23 a.m. | OK | GNU C++11 | TESTS | 57 | 216 | 8396800 | 2500 | |
29966063 | eddy1021 | D | Sept. 1, 2017, 7:20 a.m. | OK | GNU C++11 | TESTS | 57 | 218 | 8396800 | 2500 | |
54970145 | luogu_bot3 | D | June 2, 2019, 8:14 a.m. | OK | GNU C++11 | TESTS | 57 | 248 | 8192000 | 2500 | |
54970020 | luogu_bot1 | D | June 2, 2019, 8:11 a.m. | OK | GNU C++11 | TESTS | 57 | 248 | 8192000 | 2500 | |
25827913 | rajat1603 | D | March 26, 2017, 9:16 p.m. | OK | GNU C++11 | TESTS | 57 | 248 | 10240000 | 2500 | |
62597083 | luogu_bot1 | D | Oct. 15, 2019, 2:41 a.m. | OK | GNU C++11 | TESTS | 57 | 278 | 8192000 | 2500 | |
37855444 | vjudge2 | D | May 3, 2018, 7:07 a.m. | OK | GNU C++14 | TESTS | 57 | 154 | 3584000 | 2500 | |
33483960 | the_art_of_war | D | Dec. 21, 2017, 3:11 p.m. | OK | GNU C++14 | TESTS | 57 | 186 | 6246400 | 2500 | |
67270372 | ElangBondol | D | Dec. 20, 2019, 7:59 a.m. | OK | GNU C++14 | TESTS | 57 | 218 | 8396800 | 2500 | |
56017311 | sorry_im_smurfing | D | June 24, 2019, 10:32 p.m. | OK | GNU C++14 | TESTS | 57 | 280 | 8192000 | 2500 | |
67956797 | mota_haathi | D | Dec. 30, 2019, 9:58 a.m. | OK | GNU C++14 | TESTS | 57 | 310 | 8396800 | 2500 | |
23671543 | Ali.Pi | D | Jan. 9, 2017, 9:51 p.m. | OK | GNU C++14 | TESTS | 57 | 342 | 6041600 | 2500 | |
56748444 | upobir | D | July 9, 2019, 10:54 a.m. | OK | GNU C++14 | TESTS | 57 | 342 | 8192000 | 2500 | |
45269473 | vjudge1 | D | Nov. 4, 2018, 7:47 a.m. | OK | GNU C++14 | TESTS | 57 | 374 | 16486400 | 2500 | |
25858258 | Kerim.K | D | March 27, 2017, 6:50 p.m. | OK | GNU C++14 | TESTS | 57 | 404 | 10137600 | 2500 | |
29368920 | vjudge5 | D | Aug. 12, 2017, 5:19 a.m. | OK | GNU C++14 | TESTS | 57 | 404 | 21811200 | 2500 | |
40098718 | ruo | D | July 9, 2018, 2:39 a.m. | OK | GNU C++17 | TESTS | 57 | 312 | 8192000 | 2500 | |
51777190 | ivan100sic | D | March 23, 2019, 11:30 p.m. | OK | GNU C++17 | TESTS | 57 | 342 | 10444800 | 2500 | |
47171032 | shefin.cse16 | D | Dec. 17, 2018, 2:59 p.m. | OK | GNU C++17 | TESTS | 57 | 780 | 65638400 | 2500 | |
50211997 | vjudge4 | D | Feb. 20, 2019, 1:03 a.m. | OK | GNU C++17 | TESTS | 57 | 964 | 65024000 | 2500 | |
50211950 | vjudge1 | D | Feb. 20, 2019, 1:01 a.m. | OK | GNU C++17 | TESTS | 57 | 1028 | 129843200 | 2500 | |
38432575 | vivukhue | D | May 19, 2018, 1:42 p.m. | OK | GNU C++17 | TESTS | 57 | 1496 | 16486400 | 2500 | |
38432937 | vivukhue | D | May 19, 2018, 1:56 p.m. | OK | GNU C++17 | TESTS | 57 | 1560 | 16588800 | 2500 | |
61529363 | tap_tapii | D | Sept. 30, 2019, 1:49 a.m. | OK | GNU C++17 | TESTS | 57 | 1652 | 17203200 | 2500 | |
537081 | bjin | D | July 8, 2011, 5:44 p.m. | OK | Haskell | TESTS | 57 | 800 | 47206400 | 2500 | |
541886 | charleschen | D | July 11, 2011, 11:07 a.m. | OK | Java 6 | TESTS | 57 | 250 | 43110400 | 2500 | |
537443 | yaro | D | July 8, 2011, 6:11 p.m. | OK | Java 6 | TESTS | 57 | 250 | 43315200 | 2500 | |
548056 | littlekfc | D | July 16, 2011, 1:28 a.m. | OK | Java 6 | TESTS | 57 | 270 | 43110400 | 2500 | |
536154 | Petr | D | July 8, 2011, 4:44 p.m. | OK | Java 6 | TESTS | 57 | 300 | 43110400 | 2500 | |
541344 | islam-al-aarag | D | July 10, 2011, 9:23 p.m. | OK | Java 6 | TESTS | 57 | 1110 | 43417600 | 2500 | |
543890 | partizan22 | D | July 13, 2011, 4:25 a.m. | OK | Java 6 | TESTS | 57 | 1200 | 48844800 | 2500 | |
545348 | shilov | D | July 14, 2011, 3:39 p.m. | OK | Java 6 | TESTS | 57 | 1250 | 103219200 | 2500 | |
622345 | OgieKako | D | Aug. 20, 2011, 2:11 a.m. | OK | Java 6 | TESTS | 57 | 1720 | 35532800 | 2500 | |
7042742 | owenomar | D | July 7, 2014, 6:45 p.m. | OK | Java 7 | TESTS | 57 | 1496 | 102400 | 2500 | |
553941 | Hadi_Asiaie | D | July 22, 2011, 4:58 a.m. | OK | Mono C# | TESTS | 57 | 920 | 20582400 | 2500 | |
552143 | dlehdgh | D | July 20, 2011, 8:38 a.m. | OK | MS C++ | TESTS | 57 | 140 | 5427200 | 2500 | |
543347 | zjut_DD | D | July 12, 2011, 2:43 p.m. | OK | MS C++ | TESTS | 57 | 160 | 5427200 | 2500 | |
545224 | Fdg | D | July 14, 2011, 1:23 p.m. | OK | MS C++ | TESTS | 57 | 160 | 17510400 | 2500 | |
536719 | Shef | D | July 8, 2011, 4:59 p.m. | OK | MS C++ | TESTS | 57 | 170 | 5632000 | 2500 | |
536371 | Gerald | D | July 8, 2011, 4:51 p.m. | OK | MS C++ | TESTS | 57 | 200 | 6348800 | 2500 | |
548063 | littlekfc | D | July 16, 2011, 1:32 a.m. | OK | MS C++ | TESTS | 57 | 200 | 11161600 | 2500 | |
536227 | AlexFetisov | D | July 8, 2011, 4:46 p.m. | OK | MS C++ | TESTS | 57 | 230 | 5427200 | 2500 | |
541557 | kokopelli | D | July 11, 2011, 4:07 a.m. | OK | MS C++ | TESTS | 57 | 470 | 17612800 | 2500 | |
688963 | Borisp | D | Sept. 10, 2011, 10:19 p.m. | OK | MS C++ | TESTS | 57 | 520 | 9830400 | 2500 | |
538105 | NALP | D | July 8, 2011, 8:56 p.m. | OK | MS C++ | TESTS | 57 | 550 | 1433600 | 2500 |
Back to search problems