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 |
---|---|---|---|---|---|---|
685 | Codeforces Round 359 (Div. 1) | FINISHED | False | 7200 | 270480263 | June 23, 2016, 4:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4296 ) | A | Robbers' watch | PROGRAMMING | brute force combinatorics dp math | 1700 |
B"Robbers, who attacked the Gerda's cab, are very successful in covering from the kingdom police. To make the goal of catching them even harder, they use their own watches. First, as they know that kingdom police is bad at math, robbers use the positional numeral system with base 7. Second, they divide one day in n hours, and each hour in m minutes. Personal watches of each robber are divided in two parts: first of them has the smallest possible number of places that is necessary to display any integer from 0 to n xe2 x80 x89- xe2 x80 x891, while the second has the smallest possible number of places that is necessary to display any integer from 0 to m xe2 x80 x89- xe2 x80 x891. Finally, if some value of hours or minutes can be displayed using less number of places in base 7 than this watches have, the required number of zeroes is added at the beginning of notation. Note that to display number 0 section of the watches is required to have at least one place. Little robber wants to know the number of moments of time (particular values of hours and minutes), such that all digits displayed on the watches are distinct. Help her calculate this number. The first line of the input contains two integers, given in the decimal notation, n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the number of hours in one day and the number of minutes in one hour, respectively. Print one integer in decimal notation -- the number of different pairs of hour and minute, such that all digits displayed on the watches are distinct. In the first sample, possible pairs are: (0: xe2 x80 x891), (0: xe2 x80 x892), (1: xe2 x80 x890), (1: xe2 x80 x892). In the second sample, possible pairs are: (02: xe2 x80 x891), (03: xe2 x80 x891), (04: xe2 x80 x891), (05: xe2 x80 x891), (06: xe2 x80 x891)."... |
Codeforces Round #359 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
18676526 | Gassa | A | June 23, 2016, 5:13 p.m. | OK | D | TESTS | 39 | 623 | 43417600 | 1700 | |
18741575 | Grach | A | June 26, 2016, 6:53 p.m. | OK | Delphi | TESTS | 39 | 62 | 102400 | 1700 | |
18854071 | Darthvit | A | July 2, 2016, 12:32 p.m. | OK | FPC | TESTS | 39 | 15 | 0 | 1700 | |
18854035 | Darthvit | A | July 2, 2016, 12:29 p.m. | OK | FPC | TESTS | 39 | 15 | 0 | 1700 | |
18767784 | lkmcfj | A | June 28, 2016, 1:14 p.m. | OK | FPC | TESTS | 39 | 15 | 0 | 1700 | |
22215205 | bzh | A | Nov. 15, 2016, 12:03 a.m. | OK | FPC | TESTS | 39 | 30 | 0 | 1700 | |
18705723 | tieuchanlong | A | June 24, 2016, 5:27 p.m. | OK | FPC | TESTS | 39 | 61 | 0 | 1700 | |
22292540 | rainboy | A | Nov. 17, 2016, 4:01 p.m. | OK | GNU C | TESTS | 39 | 15 | 0 | 1700 | |
19161851 | sgtlaugh | A | July 15, 2016, 9:06 p.m. | OK | GNU C | TESTS | 39 | 15 | 921600 | 1700 | |
18675960 | hashlife | A | June 23, 2016, 5:09 p.m. | OK | GNU C | TESTS | 39 | 15 | 921600 | 1700 | |
22294658 | rainboy | A | Nov. 17, 2016, 6:13 p.m. | OK | GNU C | TESTS | 39 | 30 | 0 | 1700 | |
21665262 | rnd | A | Oct. 22, 2016, 11:29 a.m. | OK | GNU C | TESTS | 39 | 31 | 0 | 1700 | |
21664467 | rnd | A | Oct. 22, 2016, 10:56 a.m. | OK | GNU C | TESTS | 39 | 31 | 0 | 1700 | |
21664463 | rnd | A | Oct. 22, 2016, 10:56 a.m. | OK | GNU C | TESTS | 39 | 31 | 0 | 1700 | |
26467697 | JoeBlow | A | April 18, 2017, 3:22 a.m. | OK | GNU C | TESTS | 39 | 78 | 1945600 | 1700 | |
30012943 | cwhao | A | Sept. 2, 2017, 12:43 p.m. | OK | GNU C++ | TESTS | 39 | 15 | 0 | 1700 | |
29529846 | vjudge2 | A | Aug. 17, 2017, 3:59 p.m. | OK | GNU C++ | TESTS | 39 | 15 | 0 | 1700 | |
27662863 | Scut82 | A | June 8, 2017, 4:24 a.m. | OK | GNU C++ | TESTS | 39 | 15 | 0 | 1700 | |
27662697 | Scut82 | A | June 8, 2017, 4:10 a.m. | OK | GNU C++ | TESTS | 39 | 15 | 0 | 1700 | |
27349723 | milesgu | A | May 26, 2017, 6:28 a.m. | OK | GNU C++ | TESTS | 39 | 15 | 0 | 1700 | |
27313991 | vjudge1 | A | May 24, 2017, 4:44 a.m. | OK | GNU C++ | TESTS | 39 | 15 | 0 | 1700 | |
27005268 | skygupta | A | May 11, 2017, 2:42 a.m. | OK | GNU C++ | TESTS | 39 | 15 | 0 | 1700 | |
22004857 | zhouzx | A | Nov. 3, 2016, 2:19 a.m. | OK | GNU C++ | TESTS | 39 | 15 | 0 | 1700 | |
22004651 | lisc | A | Nov. 3, 2016, 1:47 a.m. | OK | GNU C++ | TESTS | 39 | 15 | 0 | 1700 | |
22004440 | Hello_at_123 | A | Nov. 3, 2016, 1:13 a.m. | OK | GNU C++ | TESTS | 39 | 15 | 0 | 1700 | |
32333195 | Kuha | A | Nov. 15, 2017, 1:37 p.m. | OK | GNU C++11 | TESTS | 39 | 15 | 0 | 1700 | |
27368830 | YxuanwKeith | A | May 27, 2017, 7:18 a.m. | OK | GNU C++11 | TESTS | 39 | 15 | 0 | 1700 | |
27098126 | Wholewheatbread | A | May 13, 2017, 10:53 p.m. | OK | GNU C++11 | TESTS | 39 | 15 | 0 | 1700 | |
22894582 | Hamada14 | A | Dec. 11, 2016, 9:33 p.m. | OK | GNU C++11 | TESTS | 39 | 15 | 0 | 1700 | |
22462514 | ngochai94 | A | Nov. 24, 2016, 9:15 a.m. | OK | GNU C++11 | TESTS | 39 | 15 | 0 | 1700 | |
21793682 | wakaka1 | A | Oct. 26, 2016, 12:22 p.m. | OK | GNU C++11 | TESTS | 39 | 15 | 0 | 1700 | |
21192565 | the_imp | A | Oct. 4, 2016, 5:16 p.m. | OK | GNU C++11 | TESTS | 39 | 15 | 0 | 1700 | |
20942252 | aneeshdash | A | Sept. 27, 2016, 9:51 a.m. | OK | GNU C++11 | TESTS | 39 | 15 | 0 | 1700 | |
20440148 | fitsh | A | Sept. 7, 2016, 3:25 p.m. | OK | GNU C++11 | TESTS | 39 | 15 | 0 | 1700 | |
19617727 | The-king-of-ghost | A | Aug. 4, 2016, 3:12 p.m. | OK | GNU C++11 | TESTS | 39 | 15 | 0 | 1700 | |
58901869 | kwebi | A | Aug. 16, 2019, 9:29 a.m. | OK | GNU C++14 | TESTS | 39 | 15 | 0 | 1700 | |
47804794 | rdd6584 | A | Jan. 1, 2019, 6 a.m. | OK | GNU C++14 | TESTS | 39 | 15 | 0 | 1700 | |
39450781 | gaudar | A | June 21, 2018, 4:11 a.m. | OK | GNU C++14 | TESTS | 39 | 15 | 0 | 1700 | |
32331434 | chenzhaomin123 | A | Nov. 15, 2017, 12:25 p.m. | OK | GNU C++14 | TESTS | 39 | 15 | 0 | 1700 | |
31721183 | akshay31057 | A | Oct. 25, 2017, 6:54 p.m. | OK | GNU C++14 | TESTS | 39 | 15 | 0 | 1700 | |
30861608 | murugappan_s | A | Sept. 30, 2017, 10:01 a.m. | OK | GNU C++14 | TESTS | 39 | 15 | 0 | 1700 | |
27357017 | SteelRaven | A | May 26, 2017, 1:57 p.m. | OK | GNU C++14 | TESTS | 39 | 15 | 0 | 1700 | |
27337666 | bharathg | A | May 25, 2017, 1:29 p.m. | OK | GNU C++14 | TESTS | 39 | 15 | 0 | 1700 | |
26901694 | Karasick | A | May 6, 2017, 12:56 p.m. | OK | GNU C++14 | TESTS | 39 | 15 | 0 | 1700 | |
22526605 | niklasb | A | Nov. 27, 2016, 12:42 p.m. | OK | GNU C++14 | TESTS | 39 | 15 | 0 | 1700 | |
48950075 | Nickir | A | Jan. 25, 2019, 10:29 p.m. | OK | GNU C++17 | TESTS | 39 | 15 | 716800 | 1700 | |
59670131 | Franco1010 | A | Aug. 29, 2019, 3:42 p.m. | OK | GNU C++17 | TESTS | 39 | 30 | 0 | 1700 | |
67481232 | alireza_kaviani | A | Dec. 23, 2019, 4:01 p.m. | OK | GNU C++17 | TESTS | 39 | 30 | 307200 | 1700 | |
61186547 | yuhta | A | Sept. 23, 2019, 11:14 p.m. | OK | GNU C++17 | TESTS | 39 | 30 | 307200 | 1700 | |
50794721 | Konraad | A | March 4, 2019, 5:46 p.m. | OK | GNU C++17 | TESTS | 39 | 30 | 307200 | 1700 | |
49965480 | yasminealmohandes | A | Feb. 15, 2019, 8:28 p.m. | OK | GNU C++17 | TESTS | 39 | 30 | 1024000 | 1700 | |
41335425 | jonathansilver | A | Aug. 8, 2018, 11:45 a.m. | OK | GNU C++17 | TESTS | 39 | 30 | 7987200 | 1700 | |
42142953 | pulkitg10 | A | Aug. 27, 2018, 6:58 a.m. | OK | GNU C++17 | TESTS | 39 | 30 | 80384000 | 1700 | |
67483843 | This0is0the0end | A | Dec. 23, 2019, 4:48 p.m. | OK | GNU C++17 | TESTS | 39 | 31 | 0 | 1700 | |
67483611 | AmShZ | A | Dec. 23, 2019, 4:44 p.m. | OK | GNU C++17 | TESTS | 39 | 31 | 0 | 1700 | |
18693267 | MarcoXerox | A | June 24, 2016, 3:52 a.m. | OK | Haskell | TESTS | 39 | 15 | 0 | 1700 | |
18687207 | gangsterveggies | A | June 23, 2016, 7:41 p.m. | OK | Haskell | TESTS | 39 | 468 | 8499200 | 1700 | |
19571862 | lehar | A | Aug. 2, 2016, 4:12 a.m. | OK | Java 7 | TESTS | 39 | 171 | 0 | 1700 | |
18688486 | mkirsche | A | June 23, 2016, 8:28 p.m. | OK | Java 7 | TESTS | 39 | 530 | 0 | 1700 | |
18847218 | marcose18 | A | July 2, 2016, 12:08 a.m. | OK | Java 7 | TESTS | 39 | 607 | 0 | 1700 | |
18677198 | Petruchcho | A | June 23, 2016, 5:18 p.m. | OK | Java 8 | TESTS | 39 | 109 | 0 | 1700 | |
18673690 | I_Need_Alex_R_Coleman | A | June 23, 2016, 4:57 p.m. | OK | Java 8 | TESTS | 39 | 109 | 0 | 1700 | |
18673519 | pitfall | A | June 23, 2016, 4:56 p.m. | OK | Java 8 | TESTS | 39 | 109 | 0 | 1700 | |
18671921 | AndreySiunov | A | June 23, 2016, 4:50 p.m. | OK | Java 8 | TESTS | 39 | 109 | 0 | 1700 | |
18671096 | tehqin | A | June 23, 2016, 4:47 p.m. | OK | Java 8 | TESTS | 39 | 109 | 0 | 1700 | |
20098394 | overnite.runner | A | Aug. 24, 2016, 4:45 a.m. | OK | Java 8 | TESTS | 39 | 109 | 20480000 | 1700 | |
66376254 | yaoct | A | Dec. 6, 2019, 2:56 a.m. | OK | Java 8 | TESTS | 39 | 124 | 0 | 1700 | |
62563959 | saurabhs1206 | A | Oct. 14, 2019, 12:45 p.m. | OK | Java 8 | TESTS | 39 | 124 | 0 | 1700 | |
20627921 | MazzForces | A | Sept. 14, 2016, 9:56 p.m. | OK | Java 8 | TESTS | 39 | 124 | 0 | 1700 | |
18734728 | kraskevich | A | June 26, 2016, noon | OK | Java 8 | TESTS | 39 | 124 | 0 | 1700 | |
18672080 | azukun | A | June 23, 2016, 4:51 p.m. | OK | MS C# | TESTS | 39 | 77 | 512000 | 1700 | |
22273032 | og.kostya | A | Nov. 16, 2016, 4:42 p.m. | OK | MS C# | TESTS | 39 | 77 | 2764800 | 1700 | |
18673720 | haitao | A | June 23, 2016, 4:57 p.m. | OK | MS C# | TESTS | 39 | 171 | 3072000 | 1700 | |
19451745 | vjudge3 | A | July 28, 2016, 1:36 a.m. | OK | MS C++ | TESTS | 39 | 15 | 0 | 1700 | |
18967346 | SniXosha | A | July 8, 2016, 10:26 a.m. | OK | MS C++ | TESTS | 39 | 15 | 0 | 1700 | |
18941031 | lastseed | A | July 7, 2016, 2:11 a.m. | OK | MS C++ | TESTS | 39 | 15 | 0 | 1700 | |
18914965 | vjudge4 | A | July 6, 2016, 8:39 a.m. | OK | MS C++ | TESTS | 39 | 15 | 0 | 1700 | |
18914770 | vjudge5 | A | July 6, 2016, 8:27 a.m. | OK | MS C++ | TESTS | 39 | 15 | 0 | 1700 | |
18914248 | vjudge5 | A | July 6, 2016, 7:58 a.m. | OK | MS C++ | TESTS | 39 | 15 | 0 | 1700 | |
18761017 | Los_Angelos_Laycurse | A | June 28, 2016, 2:53 a.m. | OK | MS C++ | TESTS | 39 | 15 | 0 | 1700 | |
18704128 | alepic | A | June 24, 2016, 4:07 p.m. | OK | MS C++ | TESTS | 39 | 15 | 0 | 1700 | |
18678950 | kosa_98 | A | June 23, 2016, 5:31 p.m. | OK | MS C++ | TESTS | 39 | 15 | 0 | 1700 | |
18677652 | Filyan | A | June 23, 2016, 5:21 p.m. | OK | MS C++ | TESTS | 39 | 15 | 0 | 1700 | |
57600542 | CtrlAlt | A | July 23, 2019, 3:36 p.m. | OK | MS C++ 2017 | TESTS | 39 | 46 | 0 | 1700 | |
61191260 | jalalium | A | Sept. 24, 2019, 2:52 a.m. | OK | MS C++ 2017 | TESTS | 39 | 280 | 0 | 1700 | |
18677999 | tsiki | A | June 23, 2016, 5:24 p.m. | OK | PyPy 2 | TESTS | 39 | 92 | 716800 | 1700 | |
18673615 | hellman_ | A | June 23, 2016, 4:57 p.m. | OK | PyPy 2 | TESTS | 39 | 233 | 13516800 | 1700 | |
19758262 | vjudge4 | A | Aug. 10, 2016, 4:25 a.m. | OK | PyPy 3 | TESTS | 39 | 124 | 23552000 | 1700 | |
65620577 | UTMoonlight | A | Nov. 24, 2019, 6:03 a.m. | OK | PyPy 3 | TESTS | 39 | 140 | 1945600 | 1700 | |
65932933 | Lazy_coder96 | A | Nov. 28, 2019, 10:29 p.m. | OK | PyPy 3 | TESTS | 39 | 155 | 2150400 | 1700 | |
48313752 | homoeconomicus | A | Jan. 13, 2019, 5:01 a.m. | OK | PyPy 3 | TESTS | 39 | 202 | 2764800 | 1700 | |
18683072 | duckladydinh | A | June 23, 2016, 6:08 p.m. | OK | PyPy 3 | TESTS | 39 | 467 | 4096000 | 1700 | |
23025778 | cugel | A | Dec. 16, 2016, 9:20 a.m. | OK | PyPy 3 | TESTS | 39 | 592 | 2252800 | 1700 | |
18671157 | nwi | A | June 23, 2016, 4:48 p.m. | OK | Python 2 | TESTS | 39 | 61 | 0 | 1700 | |
18989540 | chi-shde | A | July 9, 2016, 5:06 p.m. | OK | Python 2 | TESTS | 39 | 77 | 0 | 1700 | |
18878005 | mshaghi | A | July 4, 2016, 7:05 a.m. | OK | Python 2 | TESTS | 39 | 77 | 0 | 1700 | |
18744162 | nealzane | A | June 26, 2016, 11:32 p.m. | OK | Python 2 | TESTS | 39 | 93 | 0 | 1700 | |
19386894 | Taras4834 | A | July 24, 2016, 4:10 p.m. | OK | Python 2 | TESTS | 39 | 108 | 614400 | 1700 | |
18856174 | Arya_Wu | A | July 2, 2016, 3:15 p.m. | OK | Python 2 | TESTS | 39 | 576 | 1945600 | 1700 | |
18855932 | Arya_Wu | A | July 2, 2016, 2:54 p.m. | OK | Python 2 | TESTS | 39 | 607 | 1945600 | 1700 | |
18711087 | ccdd4211 | A | June 24, 2016, 11:02 p.m. | OK | Python 2 | TESTS | 39 | 717 | 18227200 | 1700 | |
18722820 | orailly | A | June 25, 2016, 4:40 p.m. | OK | Python 3 | TESTS | 39 | 61 | 0 | 1700 | |
19536039 | Artem_Lyutenkov | A | July 31, 2016, 10:35 a.m. | OK | Python 3 | TESTS | 39 | 62 | 0 | 1700 | |
18678864 | HACKorithm | A | June 23, 2016, 5:30 p.m. | OK | Python 3 | TESTS | 39 | 62 | 0 | 1700 | |
22094136 | ayejayys | A | Nov. 7, 2016, 12:31 p.m. | OK | Python 3 | TESTS | 39 | 77 | 0 | 1700 | |
19534963 | skeeph | A | July 31, 2016, 9:34 a.m. | OK | Python 3 | TESTS | 39 | 77 | 0 | 1700 | |
19033781 | bazyar.sepehr | A | July 11, 2016, 4:14 p.m. | OK | Python 3 | TESTS | 39 | 77 | 0 | 1700 | |
18770502 | stepst | A | June 28, 2016, 4:30 p.m. | OK | Python 3 | TESTS | 39 | 77 | 0 | 1700 | |
18688079 | user4598 | A | June 23, 2016, 8:10 p.m. | OK | Python 3 | TESTS | 39 | 77 | 0 | 1700 | |
18677239 | biGinNer | A | June 23, 2016, 5:18 p.m. | OK | Python 3 | TESTS | 39 | 77 | 0 | 1700 | |
30570776 | yugle7 | A | Sept. 21, 2017, 8:15 a.m. | OK | Python 3 | TESTS | 39 | 77 | 307200 | 1700 | |
18846839 | Hamada_ | A | July 1, 2016, 10:55 p.m. | OK | Scala | TESTS | 39 | 451 | 0 | 1700 |
Back to search problems