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 |
---|---|---|---|---|---|---|
1848 | Codeforces Round 885 (Div. 2) | FINISHED | False | 7200 | 47661863 | July 16, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1669 ) | F | Vika and Wiki | PROGRAMMING | binary search bitmasks combinatorics math |
B'Recently, Vika was studying her favorite internet resource - Wikipedia. On the expanses of Wikipedia, she read about an interesting mathematical operation bitwise XOR, denoted by oplus . Vika began to study the properties of this mysterious operation. To do this, she took an array a consisting of n non-negative integers and applied the following operation to all its elements at the same time: a_i = a_i oplus a_{(i+1) bmod n} . Here x bmod y denotes the remainder of dividing x by y . The elements of the array are numbered starting from 0 . Since it is not enough to perform the above actions once for a complete study, Vika repeats them until the array a becomes all zeros. Determine how many of the above actions it will take to make all elements of the array a zero. If this moment never comes, output -1 . The first line contains a single integer n ( 1 <= n <= 2^{20} ) - the length of the array a . It is guaranteed that n can be represented as 2^k for some integer k ( 0 <= k <= 20 ). The second line contains n integers a_0, a_1, a_2, ... , a_{n-1} ( 0 <= a_i <= 10^9 ) - the elements of the array a . Output a single number - the minimum number of actions required to make all elements of the array a zero, or -1 if the array a will never become zero. In the first example, after one operation, the array a will become equal to [3, 3, 3, 3] . After one more operation, it will become equal to [0, 0, 0, 0] . In the second example, the array a initially consists only of zeros. In the third example, after one operation, the array a will become equal to [0] . '... |
Codeforces Round #885 (Div.2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
214152128 | yhk1001 | F | July 17, 2023, 5:07 a.m. | OK | GNU C++14 | TESTS | 47 | 265 | 4198400 | ||
214132019 | XG0000 | F | July 17, 2023, 12:33 a.m. | OK | GNU C++14 | TESTS | 46 | 280 | 8396800 | ||
214106164 | SuperJ6 | F | July 16, 2023, 6:07 p.m. | OK | GNU C++14 | TESTS | 46 | 296 | 8396800 | ||
214149905 | Shui_Dream | F | July 17, 2023, 4:32 a.m. | OK | GNU C++14 | TESTS | 47 | 358 | 8396800 | ||
214144885 | llloserqz | F | July 17, 2023, 3:25 a.m. | OK | GNU C++14 | TESTS | 47 | 358 | 8396800 | ||
214133988 | yb13558h | F | July 17, 2023, 1:10 a.m. | OK | GNU C++14 | TESTS | 47 | 358 | 16076800 | ||
214093373 | _diu__ | F | July 16, 2023, 4:30 p.m. | OK | GNU C++14 | TESTS | 43 | 389 | 16076800 | ||
214128997 | omeganot | F | July 16, 2023, 11:18 p.m. | OK | GNU C++14 | TESTS | 46 | 436 | 8396800 | ||
214087986 | wdnmdwrnmmp | F | July 16, 2023, 4:15 p.m. | OK | GNU C++14 | TESTS | 43 | 468 | 8396800 | ||
214146206 | caijianhong | F | July 17, 2023, 3:39 a.m. | OK | GNU C++14 | TESTS | 47 | 530 | 33587200 | ||
214144520 | ccsu_zx | F | July 17, 2023, 3:21 a.m. | OK | GNU C++17 | TESTS | 47 | 280 | 8396800 | ||
214130424 | huyaowen | F | July 16, 2023, 11:54 p.m. | OK | GNU C++17 | TESTS | 46 | 296 | 7987200 | ||
214131256 | AkaiLemon | F | July 17, 2023, 12:15 a.m. | OK | GNU C++17 | TESTS | 46 | 311 | 4198400 | ||
214142381 | Morphymorphymorphy | F | July 17, 2023, 2:57 a.m. | OK | GNU C++17 | TESTS | 47 | 343 | 8396800 | ||
214103867 | sleep__ | F | July 16, 2023, 5:42 p.m. | OK | GNU C++17 | TESTS | 46 | 343 | 8396800 | ||
214090175 | KroosTheKeenGlint | F | July 16, 2023, 4:21 p.m. | OK | GNU C++17 | TESTS | 43 | 343 | 8396800 | ||
214142316 | Luca | F | July 17, 2023, 2:56 a.m. | OK | GNU C++17 | TESTS | 47 | 358 | 8396800 | ||
214137122 | Lskkkno3 | F | July 17, 2023, 1:56 a.m. | OK | GNU C++17 | TESTS | 47 | 358 | 8499200 | ||
214119350 | Mr.Robot_28 | F | July 16, 2023, 8:24 p.m. | OK | GNU C++17 | TESTS | 46 | 374 | 8396800 | ||
214103590 | sleep__ | F | July 16, 2023, 5:40 p.m. | OK | GNU C++17 | TESTS | 46 | 374 | 8396800 | ||
214087509 | Arbitrarily_large | F | July 16, 2023, 4:13 p.m. | OK | GNU C++17 (64) | TESTS | 43 | 171 | 8499200 | ||
214105514 | minato | F | July 16, 2023, 5:59 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 280 | 8396800 | ||
214097909 | bashkort | F | July 16, 2023, 4:58 p.m. | OK | GNU C++17 (64) | TESTS | 43 | 280 | 8396800 | ||
214088717 | Love_yxm | F | July 16, 2023, 4:17 p.m. | OK | GNU C++17 (64) | TESTS | 43 | 280 | 36352000 | ||
214105432 | minato | F | July 16, 2023, 5:59 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 296 | 8396800 | ||
214137030 | GoogleBot | F | July 17, 2023, 1:55 a.m. | OK | GNU C++17 (64) | TESTS | 47 | 311 | 12595200 | ||
214109955 | lunchbox | F | July 16, 2023, 6:48 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 327 | 8396800 | ||
214093409 | Kude | F | July 16, 2023, 4:30 p.m. | OK | GNU C++17 (64) | TESTS | 43 | 342 | 8396800 | ||
214109621 | WUST_KING | F | July 16, 2023, 6:43 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 342 | 36352000 | ||
214102220 | prakku_2634 | F | July 16, 2023, 5:27 p.m. | OK | GNU C++17 (64) | TESTS | 44 | 343 | 12595200 | ||
214089467 | zhouersuan | F | July 16, 2023, 4:19 p.m. | OK | GNU C++20 (64) | TESTS | 43 | 139 | 9318400 | ||
214119209 | ghoul932 | F | July 16, 2023, 8:22 p.m. | OK | GNU C++20 (64) | TESTS | 46 | 140 | 4198400 | ||
214108086 | SATSKY | F | July 16, 2023, 6:26 p.m. | OK | GNU C++20 (64) | TESTS | 46 | 140 | 4198400 | ||
214107667 | SATSKY | F | July 16, 2023, 6:22 p.m. | OK | GNU C++20 (64) | TESTS | 46 | 155 | 4198400 | ||
214105414 | BFLSTiger | F | July 16, 2023, 5:59 p.m. | OK | GNU C++20 (64) | TESTS | 46 | 155 | 4198400 | ||
214104090 | cpchenpi | F | July 16, 2023, 5:45 p.m. | OK | GNU C++20 (64) | TESTS | 46 | 155 | 8396800 | ||
214143881 | neerav3 | F | July 17, 2023, 3:13 a.m. | OK | GNU C++20 (64) | TESTS | 47 | 155 | 9216000 | ||
214145048 | CedeaT0 | F | July 17, 2023, 3:26 a.m. | OK | GNU C++20 (64) | TESTS | 47 | 156 | 4198400 | ||
214108447 | SATSKY | F | July 16, 2023, 6:30 p.m. | OK | GNU C++20 (64) | TESTS | 46 | 156 | 4198400 | ||
214087130 | GrandTiger1729 | F | July 16, 2023, 4:12 p.m. | OK | GNU C++20 (64) | TESTS | 43 | 156 | 4198400 | ||
214133724 | 0x3F | F | July 17, 2023, 1:06 a.m. | OK | Go | TESTS | 47 | 498 | 19660800 | ||
214133647 | 0x3F | F | July 17, 2023, 1:05 a.m. | OK | Go | TESTS | 47 | 498 | 19763200 | ||
214133823 | 0x3F | F | July 17, 2023, 1:07 a.m. | OK | Go | TESTS | 47 | 499 | 19763200 | ||
214128424 | dzhi | F | July 16, 2023, 11:02 p.m. | OK | Java 11 | TESTS | 46 | 421 | 39628800 | ||
214090685 | misorin | F | July 16, 2023, 4:23 p.m. | OK | PyPy 3 | TESTS | 43 | 857 | 126771200 | ||
214132250 | sonic407 | F | July 17, 2023, 12:38 a.m. | OK | PyPy 3-64 | TESTS | 46 | 405 | 118681600 | ||
214099792 | Little_Sheep_Yawn | F | July 16, 2023, 5:08 p.m. | OK | PyPy 3-64 | TESTS | 44 | 405 | 140800000 | ||
214085515 | chinerist | F | July 16, 2023, 4:07 p.m. | OK | PyPy 3-64 | TESTS | 43 | 499 | 141312000 | ||
214102896 | CristhianCH | F | July 16, 2023, 5:33 p.m. | OK | PyPy 3-64 | TESTS | 44 | 608 | 157593600 | ||
214154912 | conqueror_of_tourist | F | July 17, 2023, 5:45 a.m. | OK | PyPy 3-64 | TESTS | 47 | 670 | 174284800 | ||
214100307 | Erekemingoi | F | July 16, 2023, 5:12 p.m. | OK | PyPy 3-64 | TESTS | 44 | 1044 | 140595200 | ||
214151203 | Alexrider726 | F | July 17, 2023, 4:53 a.m. | OK | Python 3 | TESTS | 47 | 702 | 133120000 | ||
214086553 | nairb | F | July 16, 2023, 4:11 p.m. | OK | Rust 2021 | TESTS | 43 | 311 | 35225600 |
Back to search problems