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 |
---|---|---|---|---|---|---|
1028 | AIM Tech Round 5 (rated, Div. 1 + Div. 2) | FINISHED | False | 8100 | 196435499 | Aug. 27, 2018, 4:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1146 ) | E | Restore Array | PROGRAMMING | constructive algorithms | 2400 |
B'While discussing a proper problem A for a Codeforces Round, Kostya created a cyclic array of positive integers a_1, a_2, ldots, a_n . Since the talk was long and not promising, Kostya created a new cyclic array b_1, b_2, ldots, b_{n} so that b_i = (a_i mod a_{i + 1}) , where we take a_{n+1} = a_1 . Here mod is the modulo operation. When the talk became interesting, Kostya completely forgot how array a had looked like. Suddenly, he thought that restoring array a from array b would be an interesting problem (unfortunately, not A). The first line contains a single integer n ( 2 <= n <= 140582 ) -- the length of the array a . The second line contains n integers b_1, b_2, ldots, b_{n} ( 0 <= b_i <= 187126 ). If it is possible to restore some array a of length n so that b_i = a_i mod a_{(i mod n) + 1} holds for all i = 1, 2, ldots, n , print xc2 xabYES xc2 xbb in the first line and the integers a_1, a_2, ldots, a_n in the second line. All a_i should satisfy 1 <= a_i <= 10^{18} . We can show that if an answer exists, then an answer with such constraint exists as well. It it impossible to restore any valid a , print xc2 xabNO xc2 xbb in one line. You can print each letter in any case (upper or lower). In the first example: '... |
61493 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
42812683 | rr_ | E | Sept. 12, 2018, 9:27 p.m. | OK | D | TESTS | 112 | 108 | 11673600 | 2400 | |
42340630 | kshitijsingh41 | E | Sept. 1, 2018, 4:53 p.m. | OK | GNU C | TESTS | 112 | 109 | 3379200 | 2400 | |
42224206 | SylvanasS | E | Aug. 29, 2018, 12:39 a.m. | OK | GNU C++ | TESTS | 112 | 77 | 1843200 | 2400 | |
42451880 | myjs999 dxymaster2002 | E | Sept. 4, 2018, 8:41 a.m. | OK | GNU C++ | TESTS | 112 | 77 | 3276800 | 2400 | |
42194021 | emoairx | E | Aug. 28, 2018, 5:17 a.m. | OK | GNU C++ | TESTS | 112 | 78 | 2457600 | 2400 | |
42426144 | lqz | E | Sept. 3, 2018, 12:46 p.m. | OK | GNU C++ | TESTS | 112 | 78 | 11878400 | 2400 | |
42268599 | zhoujundong | E | Aug. 30, 2018, 6:52 a.m. | OK | GNU C++ | TESTS | 112 | 93 | 2457600 | 2400 | |
42189808 | Toosample | E | Aug. 28, 2018, 1:40 a.m. | OK | GNU C++ | TESTS | 112 | 93 | 2457600 | 2400 | |
42184125 | ppppaidy | E | Aug. 27, 2018, 8:23 p.m. | OK | GNU C++ | TESTS | 112 | 93 | 2662400 | 2400 | |
42191264 | _ShadowSong | E | Aug. 28, 2018, 2:56 a.m. | OK | GNU C++ | TESTS | 112 | 93 | 3072000 | 2400 | |
42350786 | 170104100115 | E | Sept. 2, 2018, 4:59 a.m. | OK | GNU C++ | TESTS | 112 | 93 | 3174400 | 2400 | |
42191592 | xymtxdy | E | Aug. 28, 2018, 3:10 a.m. | OK | GNU C++ | TESTS | 112 | 93 | 3174400 | 2400 | |
42194076 | yasugongshang | E | Aug. 28, 2018, 5:19 a.m. | OK | GNU C++11 | TESTS | 112 | 61 | 2457600 | 2400 | |
42206967 | Rebirth_A | E | Aug. 28, 2018, 12:09 p.m. | OK | GNU C++11 | TESTS | 112 | 62 | 1638400 | 2400 | |
42822224 | dengyixuan | E | Sept. 13, 2018, 7:25 a.m. | OK | GNU C++11 | TESTS | 112 | 62 | 2150400 | 2400 | |
54506840 | WOSHIGEPACHONG2 | E | May 23, 2019, 4:36 a.m. | OK | GNU C++11 | TESTS | 112 | 62 | 3276800 | 2400 | |
54152149 | SoiMae | E | May 15, 2019, 1:21 a.m. | OK | GNU C++11 | TESTS | 112 | 62 | 3276800 | 2400 | |
54152147 | SoiMae | E | May 15, 2019, 1:21 a.m. | OK | GNU C++11 | TESTS | 112 | 62 | 3276800 | 2400 | |
46701609 | fwat | E | Dec. 7, 2018, 3:12 a.m. | OK | GNU C++11 | TESTS | 112 | 62 | 3276800 | 2400 | |
46701396 | Clao_015 | E | Dec. 7, 2018, 2:57 a.m. | OK | GNU C++11 | TESTS | 112 | 62 | 3276800 | 2400 | |
42170341 | FizzyDavid | E | Aug. 27, 2018, 5:23 p.m. | OK | GNU C++11 | TESTS | 112 | 62 | 3584000 | 2400 | |
42202069 | laofudasuan | E | Aug. 28, 2018, 9:17 a.m. | OK | GNU C++11 | TESTS | 112 | 62 | 6451200 | 2400 | |
42292539 | StayAwayFromBitches | E | Aug. 30, 2018, 10:33 p.m. | OK | GNU C++14 | TESTS | 112 | 62 | 1843200 | 2400 | |
42184881 | wleung_bvg | E | Aug. 27, 2018, 8:40 p.m. | OK | GNU C++14 | TESTS | 112 | 62 | 2457600 | 2400 | |
59435528 | vjudge1 | E | Aug. 25, 2019, 8:36 a.m. | OK | GNU C++14 | TESTS | 112 | 93 | 1638400 | 2400 | |
44253841 | humveea6 | E | Oct. 13, 2018, 11:34 a.m. | OK | GNU C++14 | TESTS | 112 | 93 | 1638400 | 2400 | |
42460846 | consecutivelimit | E | Sept. 4, 2018, 1:36 p.m. | OK | GNU C++14 | TESTS | 112 | 93 | 1638400 | 2400 | |
42311289 | Minnakhmetov | E | Aug. 31, 2018, 2:27 p.m. | OK | GNU C++14 | TESTS | 112 | 93 | 1638400 | 2400 | |
42177058 | Toeto | E | Aug. 27, 2018, 6:10 p.m. | OK | GNU C++14 | TESTS | 112 | 93 | 1638400 | 2400 | |
42448062 | TCtower | E | Sept. 4, 2018, 5:44 a.m. | OK | GNU C++14 | TESTS | 112 | 93 | 1740800 | 2400 | |
42344935 | m4h | E | Sept. 1, 2018, 8:13 p.m. | OK | GNU C++14 | TESTS | 112 | 93 | 1740800 | 2400 | |
42242014 | incognito_ | E | Aug. 29, 2018, 1:04 p.m. | OK | GNU C++14 | TESTS | 112 | 93 | 1740800 | 2400 | |
45489465 | LiChenKoh | E | Nov. 9, 2018, 6:26 p.m. | OK | GNU C++17 | TESTS | 112 | 62 | 2560000 | 2400 | |
55956845 | kongroo | E | June 23, 2019, 7:31 a.m. | OK | GNU C++17 | TESTS | 112 | 78 | 2457600 | 2400 | |
64279958 | leecs0503 | E | Nov. 5, 2019, 12:56 a.m. | OK | GNU C++17 | TESTS | 112 | 78 | 2764800 | 2400 | |
42295993 | user202729_ | E | Aug. 31, 2018, 3:10 a.m. | OK | GNU C++17 | TESTS | 112 | 93 | 1331200 | 2400 | |
42333316 | comosus7 | E | Sept. 1, 2018, 11:49 a.m. | OK | GNU C++17 | TESTS | 112 | 93 | 1740800 | 2400 | |
52992857 | RNS_JKS | E | April 19, 2019, 12:34 a.m. | OK | GNU C++17 | TESTS | 112 | 93 | 1843200 | 2400 | |
42198388 | AdvancerMan | E | Aug. 28, 2018, 7:35 a.m. | OK | GNU C++17 | TESTS | 112 | 93 | 1945600 | 2400 | |
42333234 | comosus7 | E | Sept. 1, 2018, 11:47 a.m. | OK | GNU C++17 | TESTS | 112 | 93 | 2048000 | 2400 | |
42233254 | ytriayggg | E | Aug. 29, 2018, 7:59 a.m. | OK | GNU C++17 | TESTS | 112 | 93 | 2048000 | 2400 | |
42179516 | woqja125 | E | Aug. 27, 2018, 6:29 p.m. | OK | GNU C++17 | TESTS | 112 | 93 | 2048000 | 2400 | |
42348732 | kamranm | E | Sept. 2, 2018, 2:18 a.m. | OK | Go | TESTS | 112 | 483 | 6246400 | 2400 | |
44079409 | achm | E | Oct. 10, 2018, 2:24 p.m. | OK | Go | TESTS | 112 | 561 | 5222400 | 2400 | |
44079223 | achm | E | Oct. 10, 2018, 2:19 p.m. | OK | Go | TESTS | 112 | 607 | 5222400 | 2400 | |
63949537 | beginner1010 | E | Oct. 31, 2019, 8:26 p.m. | OK | Java 8 | TESTS | 112 | 140 | 0 | 2400 | |
63948483 | beginner1010 | E | Oct. 31, 2019, 7:56 p.m. | OK | Java 8 | TESTS | 112 | 155 | 0 | 2400 | |
42323892 | dalt | E | Sept. 1, 2018, 2:20 a.m. | OK | Java 8 | TESTS | 112 | 170 | 7782400 | 2400 | |
42169554 | Egor | E | Aug. 27, 2018, 5:19 p.m. | OK | Java 8 | TESTS | 112 | 186 | 0 | 2400 | |
42176675 | Jeel_Vaishnav | E | Aug. 27, 2018, 6:07 p.m. | OK | Java 8 | TESTS | 112 | 187 | 0 | 2400 | |
48701934 | Darth_Jar_Jar_Binks | E | Jan. 22, 2019, 3:19 a.m. | OK | Java 8 | TESTS | 112 | 187 | 0 | 2400 | |
42356811 | U_Square | E | Sept. 2, 2018, 9:15 a.m. | OK | Java 8 | TESTS | 112 | 187 | 0 | 2400 | |
42239444 | dodoBehind | E | Aug. 29, 2018, 11:41 a.m. | OK | Java 8 | TESTS | 112 | 187 | 0 | 2400 | |
42207447 | Codeforce_123 | E | Aug. 28, 2018, 12:24 p.m. | OK | Java 8 | TESTS | 112 | 187 | 0 | 2400 | |
42172522 | mmaxio | E | Aug. 27, 2018, 5:37 p.m. | OK | Java 8 | TESTS | 112 | 187 | 0 | 2400 | |
42331677 | aleex | E | Sept. 1, 2018, 10:32 a.m. | OK | Kotlin | TESTS | 112 | 358 | 10854400 | 2400 | |
48396071 | DarkDove | E | Jan. 14, 2019, 5:44 p.m. | OK | Mono C# | TESTS | 112 | 155 | 32460800 | 2400 | |
43595098 | abtest100 | E | Sept. 30, 2018, 6:28 a.m. | OK | MS C++ | TESTS | 112 | 93 | 2355200 | 2400 | |
44061154 | LoneFox | E | Oct. 10, 2018, 6:01 a.m. | OK | MS C++ | TESTS | 112 | 186 | 2457600 | 2400 | |
42747587 | _mactep | E | Sept. 10, 2018, 8:48 p.m. | OK | MS C++ | TESTS | 112 | 233 | 2560000 | 2400 | |
42179898 | Khazhak | E | Aug. 27, 2018, 6:32 p.m. | OK | MS C++ | TESTS | 112 | 249 | 17100800 | 2400 | |
42173417 | orz | E | Aug. 27, 2018, 5:43 p.m. | OK | MS C++ | TESTS | 112 | 264 | 2560000 | 2400 | |
42211948 | wadissimo | E | Aug. 28, 2018, 2:49 p.m. | OK | PyPy 3 | TESTS | 112 | 498 | 26931200 | 2400 | |
42208866 | Djok216 | E | Aug. 28, 2018, 1:08 p.m. | OK | Python 2 | TESTS | 112 | 498 | 15360000 | 2400 | |
42222254 | shrubb | E | Aug. 28, 2018, 9:56 p.m. | OK | Python 3 | TESTS | 112 | 436 | 16384000 | 2400 | |
42316916 | DedMartyn | E | Aug. 31, 2018, 6:03 p.m. | OK | Python 3 | TESTS | 112 | 452 | 16691200 | 2400 | |
63986860 | fancycoser | E | Nov. 1, 2019, noon | OK | Python 3 | TESTS | 112 | 545 | 10240000 | 2400 | |
42306807 | johnzeng | E | Aug. 31, 2018, 11:51 a.m. | OK | Python 3 | TESTS | 112 | 623 | 10547200 | 2400 | |
42253342 | Skybytskyi.Nikita | E | Aug. 29, 2018, 7 p.m. | OK | Python 3 | TESTS | 112 | 654 | 10547200 | 2400 | |
42196367 | meooow | E | Aug. 28, 2018, 6:36 a.m. | OK | Python 3 | TESTS | 112 | 685 | 10547200 | 2400 | |
42196134 | meooow | E | Aug. 28, 2018, 6:30 a.m. | OK | Python 3 | TESTS | 112 | 701 | 10547200 | 2400 |
Back to search problems