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 |
---|---|---|---|---|---|---|
813 | Educational Codeforces Round 22 | FINISHED | False | 7200 | 240504863 | June 5, 2017, 3:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4046 ) | B | The Golden Age | PROGRAMMING | brute force math | 1700 |
B"Unlucky year in Berland is such a year that its number n can be represented as n xe2 x80 x89= xe2 x80 x89xa xe2 x80 x89+ xe2 x80 x89yb, where a and b are non-negative integer numbers. For example, if x xe2 x80 x89= xe2 x80 x892 and y xe2 x80 x89= xe2 x80 x893 then the years 4 and 17 are unlucky (4 xe2 x80 x89= xe2 x80 x8920 xe2 x80 x89+ xe2 x80 x8931, 17 xe2 x80 x89= xe2 x80 x8923 xe2 x80 x89+ xe2 x80 x8932 xe2 x80 x89= xe2 x80 x8924 xe2 x80 x89+ xe2 x80 x8930) and year 18 isn't unlucky as there is no such representation for it. Such interval of years that there are no unlucky years in it is called The Golden Age. You should write a program which will find maximum length of The Golden Age which starts no earlier than the year l and ends no later than the year r. If all years in the interval [l, xe2 x80 x89r] are unlucky then the answer is 0. The first line contains four integer numbers x, y, l and r (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x, xe2 x80 x89y xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891018, 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 x891018). Print the maximum length of The Golden Age within the interval [l, xe2 x80 x89r]. If all years in the interval [l, xe2 x80 x89r] are unlucky then print 0. In the first example the unlucky years are 2, 3, 4, 5, 7, 9 and 10. So maximum length of The Golden Age is achived in the intervals [1, xe2 x80 x891], [6, xe2 x80 x896] and [8, xe2 x80 x898]. In the second example the longest Golden Age is the interval [15, xe2 x80 x8922]. "... |
52410 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
27587437 | ruban | B | June 5, 2017, 3:24 p.m. | OK | Delphi | TESTS | 85 | 15 | 16793600 | 1700 | |
27592783 | dangxuanvuong98 | B | June 5, 2017, 4:13 p.m. | OK | FPC | TESTS | 85 | 15 | 0 | 1700 | |
27614624 | VladProg | B | June 6, 2017, 1:15 p.m. | OK | FPC | TESTS | 85 | 15 | 102400 | 1700 | |
27593398 | tin2016_qmduc | B | June 5, 2017, 4:20 p.m. | OK | FPC | TESTS | 85 | 15 | 307200 | 1700 | |
27674106 | 1.o4 | B | June 8, 2017, 3:04 p.m. | OK | FPC | TESTS | 85 | 15 | 40140800 | 1700 | |
40842793 | chaorenhaha | B | July 27, 2018, 10:22 a.m. | OK | FPC | TESTS | 85 | 30 | 2457600 | 1700 | |
27674094 | 1.o4 | B | June 8, 2017, 3:03 p.m. | OK | FPC | TESTS | 85 | 30 | 40140800 | 1700 | |
27590766 | ndhp2000 | B | June 5, 2017, 3:52 p.m. | OK | FPC | TESTS | 85 | 31 | 8294400 | 1700 | |
27603386 | sahuang | B | June 6, 2017, 2:24 a.m. | OK | GNU C | TESTS | 85 | 15 | 102400 | 1700 | |
27588248 | rainboy | B | June 5, 2017, 3:30 p.m. | OK | GNU C | TESTS | 85 | 15 | 819200 | 1700 | |
27810506 | Jatboy | B | June 15, 2017, 7:43 p.m. | OK | GNU C | TESTS | 85 | 15 | 1638400 | 1700 | |
27599568 | sgtlaugh | B | June 5, 2017, 7:32 p.m. | OK | GNU C | TESTS | 85 | 30 | 24064000 | 1700 | |
27695974 | AgReB | B | June 9, 2017, 8:19 p.m. | OK | GNU C++ | TESTS | 85 | 15 | 0 | 1700 | |
27659833 | Shadowest | B | June 7, 2017, 11:01 p.m. | OK | GNU C++ | TESTS | 85 | 15 | 0 | 1700 | |
27630248 | milesgu | B | June 7, 2017, 10:20 a.m. | OK | GNU C++ | TESTS | 85 | 15 | 0 | 1700 | |
27627141 | liuyiluxun | B | June 7, 2017, 7:05 a.m. | OK | GNU C++ | TESTS | 85 | 15 | 0 | 1700 | |
27619147 | Vikital | B | June 6, 2017, 5:36 p.m. | OK | GNU C++ | TESTS | 85 | 15 | 0 | 1700 | |
27672397 | vjudge4 | B | June 8, 2017, 1:33 p.m. | OK | GNU C++ | TESTS | 85 | 15 | 0 | 1700 | |
30577872 | xuqijie | B | Sept. 21, 2017, 12:48 p.m. | OK | GNU C++ | TESTS | 85 | 15 | 0 | 1700 | |
27903308 | Steaunk | B | June 19, 2017, 11:27 a.m. | OK | GNU C++ | TESTS | 85 | 15 | 0 | 1700 | |
27784490 | windy_sai | B | June 15, 2017, 1:54 a.m. | OK | GNU C++ | TESTS | 85 | 15 | 0 | 1700 | |
27783263 | rahulladda | B | June 14, 2017, 11:38 p.m. | OK | GNU C++ | TESTS | 85 | 15 | 0 | 1700 | |
27655198 | Jeel_Vaishnav | B | June 7, 2017, 5:13 p.m. | OK | GNU C11 | TESTS | 85 | 15 | 102400 | 1700 | |
27622593 | veljko_r | B | June 6, 2017, 10:54 p.m. | OK | GNU C11 | TESTS | 85 | 15 | 204800 | 1700 | |
42539104 | Dragon_fxl | B | Sept. 6, 2018, 4:26 a.m. | OK | GNU C11 | TESTS | 85 | 31 | 0 | 1700 | |
42907439 | vjudge2 | B | Sept. 16, 2018, 3:48 a.m. | OK | GNU C11 | TESTS | 85 | 31 | 0 | 1700 | |
47027262 | vikr_182 | B | Dec. 15, 2018, 7:40 a.m. | OK | GNU C11 | TESTS | 85 | 31 | 7987200 | 1700 | |
27616845 | Wubaizhe | B | June 6, 2017, 3:10 p.m. | OK | GNU C++11 | TESTS | 85 | 15 | 0 | 1700 | |
27627157 | resonbility | B | June 7, 2017, 7:06 a.m. | OK | GNU C++11 | TESTS | 85 | 15 | 0 | 1700 | |
27613782 | ZHY_Star_Dust | B | June 6, 2017, 12:40 p.m. | OK | GNU C++11 | TESTS | 85 | 15 | 0 | 1700 | |
27610644 | Aman002 | B | June 6, 2017, 10:14 a.m. | OK | GNU C++11 | TESTS | 85 | 15 | 0 | 1700 | |
27609026 | zhuaiballl | B | June 6, 2017, 8:52 a.m. | OK | GNU C++11 | TESTS | 85 | 15 | 0 | 1700 | |
27608996 | caocao | B | June 6, 2017, 8:51 a.m. | OK | GNU C++11 | TESTS | 85 | 15 | 0 | 1700 | |
27608894 | caocao | B | June 6, 2017, 8:46 a.m. | OK | GNU C++11 | TESTS | 85 | 15 | 0 | 1700 | |
27608766 | caocao | B | June 6, 2017, 8:39 a.m. | OK | GNU C++11 | TESTS | 85 | 15 | 0 | 1700 | |
27608177 | Beat | B | June 6, 2017, 8:07 a.m. | OK | GNU C++11 | TESTS | 85 | 15 | 0 | 1700 | |
27607730 | Beat | B | June 6, 2017, 7:37 a.m. | OK | GNU C++11 | TESTS | 85 | 15 | 0 | 1700 | |
27646845 | ShJ | B | June 7, 2017, 1:48 p.m. | OK | GNU C++14 | TESTS | 85 | 15 | 0 | 1700 | |
27624046 | k2nt | B | June 7, 2017, 2:27 a.m. | OK | GNU C++14 | TESTS | 85 | 15 | 0 | 1700 | |
27620125 | diegocalero0 | B | June 6, 2017, 6:45 p.m. | OK | GNU C++14 | TESTS | 85 | 15 | 0 | 1700 | |
27606192 | Zz7 | B | June 6, 2017, 6:07 a.m. | OK | GNU C++14 | TESTS | 85 | 15 | 0 | 1700 | |
27600655 | MahaDev | B | June 5, 2017, 8:55 p.m. | OK | GNU C++14 | TESTS | 85 | 15 | 0 | 1700 | |
27620201 | shahriarrifat | B | June 6, 2017, 6:51 p.m. | OK | GNU C++14 | TESTS | 85 | 15 | 0 | 1700 | |
27624042 | arctic | B | June 7, 2017, 2:27 a.m. | OK | GNU C++14 | TESTS | 85 | 15 | 0 | 1700 | |
27735884 | CrafterKolyan | B | June 12, 2017, 10:28 a.m. | OK | GNU C++14 | TESTS | 85 | 15 | 0 | 1700 | |
27706957 | pateldarshan | B | June 10, 2017, 1:18 p.m. | OK | GNU C++14 | TESTS | 85 | 15 | 0 | 1700 | |
27681929 | 105032015116 | B | June 9, 2017, 3:49 a.m. | OK | GNU C++14 | TESTS | 85 | 15 | 0 | 1700 | |
35148226 | Shik | B | Feb. 11, 2018, 9:52 a.m. | OK | GNU C++17 | TESTS | 85 | 15 | 2048000 | 1700 | |
69933306 | vjudge5 | B | Feb. 1, 2020, 1:54 a.m. | OK | GNU C++17 | TESTS | 85 | 30 | 307200 | 1700 | |
41649023 | vjudge4 | B | Aug. 16, 2018, 10:36 a.m. | OK | GNU C++17 | TESTS | 85 | 30 | 307200 | 1700 | |
55016115 | BinGoo0o0o | B | June 3, 2019, 12:25 p.m. | OK | GNU C++17 | TESTS | 85 | 30 | 409600 | 1700 | |
56780921 | passerby_Liao | B | July 10, 2019, 6:12 a.m. | OK | GNU C++17 | TESTS | 85 | 30 | 48230400 | 1700 | |
41580049 | Jim_CaiCaiCai_ | B | Aug. 14, 2018, 7:36 a.m. | OK | GNU C++17 | TESTS | 85 | 31 | 0 | 1700 | |
56808139 | 2018339960028 | B | July 10, 2019, 2:48 p.m. | OK | GNU C++17 | TESTS | 85 | 31 | 0 | 1700 | |
67873051 | zvonimir11 | B | Dec. 29, 2019, 12:15 p.m. | OK | GNU C++17 | TESTS | 85 | 31 | 102400 | 1700 | |
67920067 | Dishoom88 | B | Dec. 29, 2019, 4:12 p.m. | OK | GNU C++17 | TESTS | 85 | 31 | 102400 | 1700 | |
69541240 | vjudge2 | B | Jan. 25, 2020, 9:38 p.m. | OK | GNU C++17 | TESTS | 85 | 31 | 102400 | 1700 | |
32974178 | bert30702 | B | Dec. 6, 2017, 11:52 a.m. | OK | GNU C++17 Diagnostics | TESTS | 85 | 998 | 104755200 | 1700 | |
28020600 | sl0th | B | June 25, 2017, 10:53 a.m. | OK | Haskell | TESTS | 85 | 15 | 44851200 | 1700 | |
27589571 | johannesk | B | June 5, 2017, 3:41 p.m. | OK | Haskell | TESTS | 85 | 46 | 8499200 | 1700 | |
31948361 | habanera | B | Nov. 1, 2017, 11:50 a.m. | OK | Java 8 | TESTS | 85 | 109 | 0 | 1700 | |
68881481 | Okhair | B | Jan. 15, 2020, 7 p.m. | OK | Java 8 | TESTS | 85 | 109 | 0 | 1700 | |
64769860 | T_Nady | B | Nov. 12, 2019, 10:22 p.m. | OK | Java 8 | TESTS | 85 | 109 | 0 | 1700 | |
56001029 | MohammadHossam | B | June 24, 2019, 1:01 p.m. | OK | Java 8 | TESTS | 85 | 109 | 0 | 1700 | |
55746758 | Shetewi | B | June 19, 2019, 10:29 a.m. | OK | Java 8 | TESTS | 85 | 109 | 0 | 1700 | |
55723297 | O_E | B | June 18, 2019, 4:24 p.m. | OK | Java 8 | TESTS | 85 | 109 | 0 | 1700 | |
54494673 | ZebraBlu | B | May 22, 2019, 5:08 p.m. | OK | Java 8 | TESTS | 85 | 109 | 0 | 1700 | |
50092657 | manish_98 | B | Feb. 18, 2019, 11:16 a.m. | OK | Java 8 | TESTS | 85 | 109 | 0 | 1700 | |
46177673 | o.radwan | B | Nov. 24, 2018, 4:04 p.m. | OK | Java 8 | TESTS | 85 | 109 | 0 | 1700 | |
27887721 | chojh1222 | B | June 18, 2017, 3:59 p.m. | OK | Java 8 | TESTS | 85 | 109 | 0 | 1700 | |
27590804 | hamayanhamayan | B | June 5, 2017, 3:53 p.m. | OK | Kotlin | TESTS | 85 | 155 | 614400 | 1700 | |
27590897 | leign | B | June 5, 2017, 3:54 p.m. | OK | Mono C# | TESTS | 85 | 46 | 102400 | 1700 | |
27598768 | Drinker | B | June 5, 2017, 6:40 p.m. | OK | Mono C# | TESTS | 85 | 93 | 2560000 | 1700 | |
27630294 | IleksaNott | B | June 7, 2017, 10:22 a.m. | OK | MS C# | TESTS | 85 | 46 | 102400 | 1700 | |
27630352 | IleksaNott | B | June 7, 2017, 10:26 a.m. | OK | MS C# | TESTS | 85 | 46 | 102400 | 1700 | |
27618293 | og.kostya | B | June 6, 2017, 4:35 p.m. | OK | MS C# | TESTS | 85 | 46 | 204800 | 1700 | |
27587727 | azukun | B | June 5, 2017, 3:26 p.m. | OK | MS C# | TESTS | 85 | 62 | 512000 | 1700 | |
27630231 | Samyrai | B | June 7, 2017, 10:19 a.m. | OK | MS C# | TESTS | 85 | 62 | 2969600 | 1700 | |
27711598 | CroDoc | B | June 10, 2017, 9:35 p.m. | OK | MS C# | TESTS | 85 | 77 | 2560000 | 1700 | |
27782642 | zazak | B | June 14, 2017, 10:40 p.m. | OK | MS C# | TESTS | 85 | 93 | 2560000 | 1700 | |
27598839 | artsin666 | B | June 5, 2017, 6:43 p.m. | OK | MS C# | TESTS | 85 | 93 | 2969600 | 1700 | |
27621797 | Sorryforpartyrocking | B | June 6, 2017, 9:15 p.m. | OK | MS C# | TESTS | 85 | 155 | 5632000 | 1700 | |
27590503 | azim__ | B | June 5, 2017, 3:50 p.m. | OK | MS C++ | TESTS | 85 | 15 | 102400 | 1700 | |
27591651 | gerind | B | June 5, 2017, 4:01 p.m. | OK | MS C++ | TESTS | 85 | 15 | 204800 | 1700 | |
27797408 | MrMirotic | B | June 15, 2017, 3:16 p.m. | OK | MS C++ | TESTS | 85 | 15 | 204800 | 1700 | |
27777996 | -Kit- | B | June 14, 2017, 6:04 p.m. | OK | MS C++ | TESTS | 85 | 15 | 204800 | 1700 | |
27686002 | adlovlac1503 | B | June 9, 2017, 9:18 a.m. | OK | MS C++ | TESTS | 85 | 15 | 204800 | 1700 | |
27652184 | AlexJokel | B | June 7, 2017, 3:23 p.m. | OK | MS C++ | TESTS | 85 | 15 | 204800 | 1700 | |
27600766 | KocherginDaniil | B | June 5, 2017, 9:09 p.m. | OK | MS C++ | TESTS | 85 | 15 | 204800 | 1700 | |
27589490 | kagyi | B | June 5, 2017, 3:41 p.m. | OK | MS C++ | TESTS | 85 | 15 | 204800 | 1700 | |
27588773 | goodhope | B | June 5, 2017, 3:35 p.m. | OK | MS C++ | TESTS | 85 | 15 | 204800 | 1700 | |
27586775 | lucyanna2018 | B | June 5, 2017, 3:19 p.m. | OK | MS C++ | TESTS | 85 | 15 | 204800 | 1700 | |
56784796 | ZSTU-2018329621261 | B | July 10, 2019, 7:53 a.m. | OK | MS C++ 2017 | TESTS | 85 | 31 | 102400 | 1700 | |
27845587 | sid_m97 | B | June 17, 2017, 12:19 p.m. | OK | PyPy 2 | TESTS | 85 | 62 | 409600 | 1700 | |
27621010 | tmarice | B | June 6, 2017, 8 p.m. | OK | PyPy 2 | TESTS | 85 | 77 | 512000 | 1700 | |
27696967 | abhigupta4 | B | June 9, 2017, 9:56 p.m. | OK | PyPy 2 | TESTS | 85 | 77 | 614400 | 1700 | |
27594452 | rishabhjain1996 | B | June 5, 2017, 4:34 p.m. | OK | PyPy 2 | TESTS | 85 | 77 | 614400 | 1700 | |
27619248 | shangtai | B | June 6, 2017, 5:42 p.m. | OK | PyPy 2 | TESTS | 85 | 77 | 716800 | 1700 | |
27612287 | Noureldin | B | June 6, 2017, 11:37 a.m. | OK | PyPy 2 | TESTS | 85 | 77 | 819200 | 1700 | |
27587984 | Yash_ | B | June 5, 2017, 3:28 p.m. | OK | PyPy 2 | TESTS | 85 | 93 | 409600 | 1700 | |
27588142 | fluffyowl | B | June 5, 2017, 3:30 p.m. | OK | PyPy 2 | TESTS | 85 | 93 | 512000 | 1700 | |
27752978 | sragavan | B | June 13, 2017, 10 a.m. | OK | PyPy 2 | TESTS | 85 | 93 | 614400 | 1700 | |
34170625 | attiw | B | Jan. 14, 2018, 8:51 a.m. | OK | PyPy 2 | TESTS | 85 | 93 | 21606400 | 1700 | |
28022869 | zty0826 | B | June 25, 2017, 1:28 p.m. | OK | PyPy 3 | TESTS | 85 | 109 | 24371200 | 1700 | |
27587353 | sokokaleb | B | June 5, 2017, 3:23 p.m. | OK | PyPy 3 | TESTS | 85 | 124 | 1126400 | 1700 | |
27587811 | Naoki_M | B | June 5, 2017, 3:27 p.m. | OK | PyPy 3 | TESTS | 85 | 124 | 1433600 | 1700 | |
27662093 | runar.hovland | B | June 8, 2017, 3:12 a.m. | OK | PyPy 3 | TESTS | 85 | 124 | 1536000 | 1700 | |
28107525 | BenL | B | June 28, 2017, 4:11 a.m. | OK | PyPy 3 | TESTS | 85 | 124 | 24883200 | 1700 | |
27744249 | Sun_For_Life | B | June 12, 2017, 7:52 p.m. | OK | PyPy 3 | TESTS | 85 | 139 | 1536000 | 1700 | |
49988778 | lerooo | B | Feb. 16, 2019, 11:47 a.m. | OK | PyPy 3 | TESTS | 85 | 140 | 512000 | 1700 | |
51452695 | adshin21 | B | March 18, 2019, 3:31 p.m. | OK | PyPy 3 | TESTS | 85 | 140 | 1433600 | 1700 | |
61030008 | sjoshi13 | B | Sept. 21, 2019, 5:21 p.m. | OK | PyPy 3 | TESTS | 85 | 140 | 1945600 | 1700 | |
66272588 | _Aaryan_ | B | Dec. 4, 2019, 12:49 p.m. | OK | PyPy 3 | TESTS | 85 | 155 | 1945600 | 1700 | |
27768662 | Avalanche | B | June 14, 2017, 6:27 a.m. | OK | Python 2 | TESTS | 85 | 61 | 102400 | 1700 | |
27631866 | 0ogway | B | June 7, 2017, 11:52 a.m. | OK | Python 2 | TESTS | 85 | 61 | 102400 | 1700 | |
27594379 | mithi100 | B | June 5, 2017, 4:33 p.m. | OK | Python 2 | TESTS | 85 | 61 | 102400 | 1700 | |
29222415 | code.computer | B | Aug. 5, 2017, 3:46 p.m. | OK | Python 2 | TESTS | 85 | 61 | 4812800 | 1700 | |
28203517 | vjudge4 | B | July 2, 2017, 5:11 a.m. | OK | Python 2 | TESTS | 85 | 61 | 4812800 | 1700 | |
27771739 | pkacprzak | B | June 14, 2017, 9:57 a.m. | OK | Python 2 | TESTS | 85 | 62 | 0 | 1700 | |
27655808 | ershivasoni | B | June 7, 2017, 5:43 p.m. | OK | Python 2 | TESTS | 85 | 62 | 0 | 1700 | |
27817958 | nealzane | B | June 16, 2017, 5:57 a.m. | OK | Python 2 | TESTS | 85 | 62 | 102400 | 1700 | |
27711471 | 2Deep | B | June 10, 2017, 9:22 p.m. | OK | Python 2 | TESTS | 85 | 62 | 102400 | 1700 | |
27629907 | franckmy | B | June 7, 2017, 10 a.m. | OK | Python 2 | TESTS | 85 | 62 | 102400 | 1700 | |
31913408 | BENYAM1N | B | Oct. 31, 2017, 7:43 a.m. | OK | Python 3 | TESTS | 85 | 62 | 0 | 1700 | |
27629718 | end83 | B | June 7, 2017, 9:45 a.m. | OK | Python 3 | TESTS | 85 | 62 | 0 | 1700 | |
27622613 | nikhilhassija | B | June 6, 2017, 10:58 p.m. | OK | Python 3 | TESTS | 85 | 62 | 0 | 1700 | |
27587666 | pr3pony | B | June 5, 2017, 3:26 p.m. | OK | Python 3 | TESTS | 85 | 62 | 0 | 1700 | |
27586201 | SoMuchDrama | B | June 5, 2017, 3:15 p.m. | OK | Python 3 | TESTS | 85 | 62 | 0 | 1700 | |
27884130 | Arhimason | B | June 18, 2017, 12:06 p.m. | OK | Python 3 | TESTS | 85 | 62 | 204800 | 1700 | |
27826453 | imaxblue | B | June 16, 2017, 1:46 p.m. | OK | Python 3 | TESTS | 85 | 62 | 204800 | 1700 | |
27787710 | Legendaddy | B | June 15, 2017, 6:44 a.m. | OK | Python 3 | TESTS | 85 | 62 | 204800 | 1700 | |
27711689 | sonnyday | B | June 10, 2017, 9:47 p.m. | OK | Python 3 | TESTS | 85 | 62 | 204800 | 1700 | |
27629134 | Zrj | B | June 7, 2017, 9:09 a.m. | OK | Python 3 | TESTS | 85 | 62 | 204800 | 1700 | |
65700678 | wakuwinmail | B | Nov. 25, 2019, 10:38 a.m. | OK | Ruby | TESTS | 85 | 62 | 204800 | 1700 | |
27588419 | torus711 | B | June 5, 2017, 3:32 p.m. | OK | Ruby | TESTS | 85 | 77 | 1945600 | 1700 | |
27704402 | Hankai | B | June 10, 2017, 10:36 a.m. | OK | Ruby | TESTS | 85 | 109 | 3379200 | 1700 |
Back to search problems