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 |
---|---|---|---|---|---|---|
1726 | Codeforces Round 819 (Div. 1 + Div. 2) and Grimoire of Code Annual Contest 2022 | FINISHED | False | 8100 | 74705063 | Sept. 6, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 15556 ) | B | Mainak and Interesting Sequence | PROGRAMMING | bitmasks constructive algorithms math |
B'Mainak has two positive integers n and m . Mainak finds a sequence a_1, a_2, ldots, a_n of n positive integers interesting, if for all integers i ( 1 <= i <= n ), the bitwise XOR of all elements in a which are strictly less than a_i is 0 . Formally if p_i is the bitwise XOR of all elements in a which are strictly less than a_i , then a is an interesting sequence if p_1 = p_2 = ldots = p_n = 0 . For example, sequences [1,3,2,3,1,2,3] , [4,4,4,4] , [25] are interesting, whereas [1,2,3,4] ( p_2 = 1 ne 0 ), [4,1,1,2,4] ( p_1 = 1 oplus 1 oplus 2 = 2 ne 0 ), [29,30,30] ( p_2 = 29 ne 0 ) aren 't interesting. Here a oplus b denotes bitwise XOR of integers a and b . Find any interesting sequence a_1, a_2, ldots, a_n (or report that there exists no such sequence) such that the sum of the elements in the sequence a is equal to m , i.e. a_1 + a_2 ldots + a_n = m . As a reminder, the bitwise XOR of an empty sequence is considered to be 0 . Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^5 ) -- the number of test cases. Description of the test cases follows. The first line and the only line of each test case contains two integers n and m ( 1 <= n <= 10^5 , 1 <= m <= 10^9 ) -- the length of the sequence and the sum of the elements. It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case, if there exists some interesting sequence, output "Yes" on the first line, otherwise output "No". You may print each letter in any case (for example, "YES", "Yes", "yes", "yEs" will all be recognized as positive answer). If the answer is "Yes", output n positive integers a_1, a_2, ldots, a_n ( a_i ge 1 ), forming an interesting sequence such that a_1 +'... |
Codeforces Round #819 (Div. 1 + Div. 2) and Grimoire of Code Annual Contest 2022 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
171185701 | byte0010 | B | Sept. 7, 2022, 2:22 a.m. | OK | GNU C11 | TESTS | 17 | 826 | 0 | ||
171162065 | chethan58 | B | Sept. 6, 2022, 6:43 p.m. | OK | GNU C11 | TESTS | 17 | 826 | 0 | ||
171143953 | Abhishek_Tewatia | B | Sept. 6, 2022, 4:33 p.m. | OK | GNU C11 | TESTS | 17 | 858 | 0 | ||
171154643 | SP2003 | B | Sept. 6, 2022, 5:49 p.m. | OK | GNU C11 | TESTS | 17 | 858 | 0 | ||
171145490 | leaps | B | Sept. 6, 2022, 4:37 p.m. | OK | GNU C++14 | TESTS | 17 | 46 | 409600 | ||
171143066 | SunnyYuan | B | Sept. 6, 2022, 4:31 p.m. | OK | GNU C++14 | TESTS | 17 | 61 | 0 | ||
171178692 | JoesSR | B | Sept. 6, 2022, 11:34 p.m. | OK | GNU C++14 | TESTS | 17 | 61 | 0 | ||
171155959 | rfpermen | B | Sept. 6, 2022, 5:55 p.m. | OK | GNU C++14 | TESTS | 17 | 61 | 0 | ||
171147253 | SIFCP | B | Sept. 6, 2022, 4:42 p.m. | OK | GNU C++14 | TESTS | 17 | 61 | 0 | ||
171193660 | Mcggvc | B | Sept. 7, 2022, 5:04 a.m. | OK | GNU C++14 | TESTS | 17 | 62 | 0 | ||
171182102 | cwldecf | B | Sept. 7, 2022, 1:03 a.m. | OK | GNU C++14 | TESTS | 17 | 62 | 0 | ||
171180808 | lqr2018 | B | Sept. 7, 2022, 12:32 a.m. | OK | GNU C++14 | TESTS | 17 | 62 | 0 | ||
171168414 | omthakare | B | Sept. 6, 2022, 7:54 p.m. | OK | GNU C++14 | TESTS | 17 | 62 | 0 | ||
171179775 | VVsxmja | B | Sept. 7, 2022, 12:05 a.m. | OK | GNU C++14 | TESTS | 17 | 62 | 1228800 | ||
171183740 | AlbusSeverusPotter | B | Sept. 7, 2022, 1:41 a.m. | OK | GNU C++17 | TESTS | 17 | 61 | 0 | ||
171144376 | nhnahin | B | Sept. 6, 2022, 4:34 p.m. | OK | GNU C++17 | TESTS | 17 | 61 | 0 | ||
171183881 | Minkowsi | B | Sept. 7, 2022, 1:44 a.m. | OK | GNU C++17 | TESTS | 17 | 61 | 0 | ||
171180011 | Lingjiang | B | Sept. 7, 2022, 12:11 a.m. | OK | GNU C++17 | TESTS | 17 | 61 | 409600 | ||
171167152 | rrdas | B | Sept. 6, 2022, 7:38 p.m. | OK | GNU C++17 | TESTS | 17 | 61 | 409600 | ||
171196087 | AmiteshMagar | B | Sept. 7, 2022, 5:42 a.m. | OK | GNU C++17 | TESTS | 17 | 61 | 409600 | ||
171145646 | naveen_2p | B | Sept. 6, 2022, 4:37 p.m. | OK | GNU C++17 | TESTS | 17 | 61 | 1126400 | ||
171187733 | emrulhasan | B | Sept. 7, 2022, 3:08 a.m. | OK | GNU C++17 | TESTS | 17 | 62 | 0 | ||
171191659 | Chichoo | B | Sept. 7, 2022, 4:28 a.m. | OK | GNU C++17 | TESTS | 17 | 62 | 0 | ||
171182983 | floating_clouds | B | Sept. 7, 2022, 1:24 a.m. | OK | GNU C++17 | TESTS | 17 | 62 | 0 | ||
171189083 | wonderful_trip | B | Sept. 7, 2022, 3:37 a.m. | OK | GNU C++17 (64) | TESTS | 17 | 46 | 0 | ||
171194849 | __REE | B | Sept. 7, 2022, 5:22 a.m. | OK | GNU C++17 (64) | TESTS | 17 | 46 | 0 | ||
171185900 | Eter.nal | B | Sept. 7, 2022, 2:27 a.m. | OK | GNU C++17 (64) | TESTS | 17 | 46 | 0 | ||
171185272 | ReSakura | B | Sept. 7, 2022, 2:14 a.m. | OK | GNU C++17 (64) | TESTS | 17 | 46 | 0 | ||
171166609 | PandemicP | B | Sept. 6, 2022, 7:31 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 46 | 0 | ||
171157223 | failure._M0nK | B | Sept. 6, 2022, 6:04 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 46 | 0 | ||
171149031 | NEDO | B | Sept. 6, 2022, 4:46 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 46 | 0 | ||
171145779 | MeMoElprince | B | Sept. 6, 2022, 4:38 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 46 | 0 | ||
171142914 | Logan_17 | B | Sept. 6, 2022, 4:30 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 46 | 0 | ||
171185235 | chenmoooo | B | Sept. 7, 2022, 2:13 a.m. | OK | GNU C++17 (64) | TESTS | 17 | 46 | 204800 | ||
171185518 | harshgoyal178 | B | Sept. 7, 2022, 2:19 a.m. | OK | GNU C++20 (64) | TESTS | 17 | 31 | 0 | ||
171185356 | PanC_ake | B | Sept. 7, 2022, 2:15 a.m. | OK | GNU C++20 (64) | TESTS | 17 | 31 | 0 | ||
171184199 | an_da | B | Sept. 7, 2022, 1:51 a.m. | OK | GNU C++20 (64) | TESTS | 17 | 31 | 0 | ||
171183072 | myy04 | B | Sept. 7, 2022, 1:26 a.m. | OK | GNU C++20 (64) | TESTS | 17 | 31 | 0 | ||
171178398 | RetsaZC19 | B | Sept. 6, 2022, 11:27 p.m. | OK | GNU C++20 (64) | TESTS | 17 | 31 | 0 | ||
171173710 | Ivan_len | B | Sept. 6, 2022, 9:30 p.m. | OK | GNU C++20 (64) | TESTS | 17 | 31 | 0 | ||
171186441 | Adam_GS | B | Sept. 7, 2022, 2:40 a.m. | OK | GNU C++20 (64) | TESTS | 17 | 31 | 0 | ||
171193897 | musatur | B | Sept. 7, 2022, 5:07 a.m. | OK | GNU C++20 (64) | TESTS | 17 | 31 | 0 | ||
171194140 | dedsec_29 | B | Sept. 7, 2022, 5:11 a.m. | OK | GNU C++20 (64) | TESTS | 17 | 31 | 0 | ||
171185878 | alive | B | Sept. 7, 2022, 2:26 a.m. | OK | GNU C++20 (64) | TESTS | 17 | 31 | 0 | ||
171159584 | rd37574 | B | Sept. 6, 2022, 6:22 p.m. | OK | Java 11 | TESTS | 17 | 170 | 0 | ||
171160171 | rd37574 | B | Sept. 6, 2022, 6:27 p.m. | OK | Java 11 | TESTS | 17 | 171 | 0 | ||
171157833 | rd37574 | B | Sept. 6, 2022, 6:08 p.m. | OK | Java 11 | TESTS | 17 | 187 | 0 | ||
171167461 | dunkingdonuts | B | Sept. 6, 2022, 7:42 p.m. | OK | Java 11 | TESTS | 17 | 202 | 0 | ||
171183964 | satyaa_78 | B | Sept. 7, 2022, 1:46 a.m. | OK | Java 11 | TESTS | 17 | 218 | 0 | ||
171181214 | jhariharan99official | B | Sept. 7, 2022, 12:43 a.m. | OK | Java 11 | TESTS | 17 | 218 | 0 | ||
171187852 | aamir_1102 | B | Sept. 7, 2022, 3:11 a.m. | OK | Java 11 | TESTS | 17 | 249 | 0 | ||
171159578 | prakharS-18 | B | Sept. 6, 2022, 6:22 p.m. | OK | Java 11 | TESTS | 17 | 249 | 41267200 | ||
171143427 | shivgarg321 | B | Sept. 6, 2022, 4:32 p.m. | OK | Java 11 | TESTS | 17 | 265 | 0 | ||
171143475 | newguy1 | B | Sept. 6, 2022, 4:32 p.m. | OK | Java 11 | TESTS | 17 | 280 | 0 | ||
171189121 | Java_Programmer | B | Sept. 7, 2022, 3:39 a.m. | OK | Java 17 | TESTS | 17 | 218 | 716800 | ||
171150685 | tanmayjagtap | B | Sept. 6, 2022, 4:49 p.m. | OK | Java 17 | TESTS | 17 | 234 | 1638400 | ||
171146097 | haloh_03 | B | Sept. 6, 2022, 4:39 p.m. | OK | Java 17 | TESTS | 17 | 280 | 307200 | ||
171172207 | AdityaGupta19 | B | Sept. 6, 2022, 8:57 p.m. | OK | Java 17 | TESTS | 17 | 826 | 819200 | ||
171167747 | Ali04 | B | Sept. 6, 2022, 7:45 p.m. | OK | Java 17 | TESTS | 17 | 872 | 0 | ||
171164141 | less_ordinary | B | Sept. 6, 2022, 7:03 p.m. | OK | Java 8 | TESTS | 17 | 139 | 0 | ||
171171420 | coder_terror | B | Sept. 6, 2022, 8:41 p.m. | OK | Java 8 | TESTS | 17 | 140 | 2457600 | ||
171166979 | rish1896 | B | Sept. 6, 2022, 7:35 p.m. | OK | Java 8 | TESTS | 17 | 155 | 0 | ||
171166940 | This_is_Rish | B | Sept. 6, 2022, 7:35 p.m. | OK | Java 8 | TESTS | 17 | 155 | 0 | ||
171165424 | dev_14 | B | Sept. 6, 2022, 7:18 p.m. | OK | Java 8 | TESTS | 17 | 155 | 0 | ||
171164402 | Grizler | B | Sept. 6, 2022, 7:06 p.m. | OK | Java 8 | TESTS | 17 | 155 | 0 | ||
171155145 | Do_not_Look_Back | B | Sept. 6, 2022, 5:51 p.m. | OK | Java 8 | TESTS | 17 | 155 | 0 | ||
171177739 | ac23 | B | Sept. 6, 2022, 11:09 p.m. | OK | Java 8 | TESTS | 17 | 155 | 2560000 | ||
171186347 | vinayakrg | B | Sept. 7, 2022, 2:38 a.m. | OK | Java 8 | TESTS | 17 | 155 | 3379200 | ||
171195185 | ankit_0207 | B | Sept. 7, 2022, 5:28 a.m. | OK | Java 8 | TESTS | 17 | 156 | 0 | ||
171150192 | shek_shek | B | Sept. 6, 2022, 4:48 p.m. | OK | Kotlin 1.6 | TESTS | 17 | 265 | 0 | ||
171176469 | Bloodwyn | B | Sept. 6, 2022, 10:35 p.m. | OK | Kotlin 1.6 | TESTS | 17 | 577 | 0 | ||
171175990 | Bloodwyn | B | Sept. 6, 2022, 10:23 p.m. | OK | Kotlin 1.6 | TESTS | 17 | 592 | 0 | ||
171185904 | 6ziv | B | Sept. 7, 2022, 2:27 a.m. | OK | MS C++ 2017 | TESTS | 17 | 78 | 0 | ||
171196543 | BlackCodeIsGood | B | Sept. 7, 2022, 5:49 a.m. | OK | MS C++ 2017 | TESTS | 17 | 187 | 0 | ||
171173416 | That_Salamander | B | Sept. 6, 2022, 9:23 p.m. | OK | MS C++ 2017 | TESTS | 17 | 514 | 409600 | ||
171142309 | lyg3715371537 | B | Sept. 6, 2022, 4:29 p.m. | OK | MS C++ 2017 | TESTS | 17 | 576 | 0 | ||
171192377 | misaka12435 | B | Sept. 7, 2022, 4:42 a.m. | OK | MS C++ 2017 | TESTS | 17 | 811 | 102400 | ||
171157222 | Ahmedmadbouly186 | B | Sept. 6, 2022, 6:04 p.m. | OK | MS C++ 2017 | TESTS | 17 | 826 | 0 | ||
171168187 | cptahahab | B | Sept. 6, 2022, 7:51 p.m. | OK | MS C++ 2017 | TESTS | 17 | 841 | 0 | ||
171155143 | 1_2_3_4_5_9 | B | Sept. 6, 2022, 5:51 p.m. | OK | PyPy 2 | TESTS | 17 | 218 | 13209600 | ||
171165561 | omar.gawdat | B | Sept. 6, 2022, 7:19 p.m. | OK | PyPy 3 | TESTS | 17 | 249 | 5529600 | ||
171160415 | plevande | B | Sept. 6, 2022, 6:29 p.m. | OK | PyPy 3 | TESTS | 17 | 311 | 9216000 | ||
171171045 | Dromo | B | Sept. 6, 2022, 8:35 p.m. | OK | PyPy 3 | TESTS | 17 | 389 | 10342400 | ||
171180427 | Jvaeyhcd | B | Sept. 7, 2022, 12:23 a.m. | OK | PyPy 3 | TESTS | 17 | 405 | 10547200 | ||
171171332 | Dromo | B | Sept. 6, 2022, 8:40 p.m. | OK | PyPy 3 | TESTS | 17 | 405 | 10956800 | ||
171158022 | u1602016 | B | Sept. 6, 2022, 6:10 p.m. | OK | PyPy 3 | TESTS | 17 | 436 | 10342400 | ||
171161802 | Su_123 | B | Sept. 6, 2022, 6:41 p.m. | OK | PyPy 3 | TESTS | 17 | 436 | 10752000 | ||
171158977 | sdt4936 | B | Sept. 6, 2022, 6:17 p.m. | OK | PyPy 3 | TESTS | 17 | 436 | 10956800 | ||
171159056 | sdt4936 | B | Sept. 6, 2022, 6:18 p.m. | OK | PyPy 3 | TESTS | 17 | 451 | 11161600 | ||
171154893 | Pooja96 | B | Sept. 6, 2022, 5:50 p.m. | OK | PyPy 3 | TESTS | 17 | 468 | 10342400 | ||
171167093 | omar.gawdat | B | Sept. 6, 2022, 7:37 p.m. | OK | PyPy 3-64 | TESTS | 17 | 93 | 6758400 | ||
171165143 | omar.gawdat | B | Sept. 6, 2022, 7:14 p.m. | OK | PyPy 3-64 | TESTS | 17 | 108 | 6758400 | ||
171167341 | omar.gawdat | B | Sept. 6, 2022, 7:40 p.m. | OK | PyPy 3-64 | TESTS | 17 | 109 | 6860800 | ||
171162874 | omar.gawdat | B | Sept. 6, 2022, 6:50 p.m. | OK | PyPy 3-64 | TESTS | 17 | 124 | 9011200 | ||
171163939 | omar.gawdat | B | Sept. 6, 2022, 7:01 p.m. | OK | PyPy 3-64 | TESTS | 17 | 139 | 9011200 | ||
171192496 | PVR11 | B | Sept. 7, 2022, 4:44 a.m. | OK | PyPy 3-64 | TESTS | 17 | 139 | 9932800 | ||
171163758 | omar.gawdat | B | Sept. 6, 2022, 6:59 p.m. | OK | PyPy 3-64 | TESTS | 17 | 155 | 8908800 | ||
171164936 | DeathIsAwe | B | Sept. 6, 2022, 7:12 p.m. | OK | PyPy 3-64 | TESTS | 17 | 170 | 9932800 | ||
171182104 | farrellbyu | B | Sept. 7, 2022, 1:03 a.m. | OK | PyPy 3-64 | TESTS | 17 | 170 | 10547200 | ||
171170559 | kavorka | B | Sept. 6, 2022, 8:27 p.m. | OK | PyPy 3-64 | TESTS | 17 | 171 | 11059200 | ||
171196022 | minochaji | B | Sept. 7, 2022, 5:41 a.m. | OK | Python 3 | TESTS | 17 | 405 | 4505600 | ||
171190419 | kollisubhas | B | Sept. 7, 2022, 4:04 a.m. | OK | Python 3 | TESTS | 17 | 405 | 5734400 | ||
171168766 | rr745 | B | Sept. 6, 2022, 7:59 p.m. | OK | Python 3 | TESTS | 17 | 405 | 5734400 | ||
171160245 | avolventa | B | Sept. 6, 2022, 6:27 p.m. | OK | Python 3 | TESTS | 17 | 436 | 1843200 | ||
171161255 | tony_lenc_ | B | Sept. 6, 2022, 6:35 p.m. | OK | Python 3 | TESTS | 17 | 436 | 5734400 | ||
171161898 | Su_123 | B | Sept. 6, 2022, 6:41 p.m. | OK | Python 3 | TESTS | 17 | 451 | 1126400 | ||
171158611 | kamtendra_20 | B | Sept. 6, 2022, 6:14 p.m. | OK | Python 3 | TESTS | 17 | 451 | 3379200 | ||
171196458 | NS3081992 | B | Sept. 7, 2022, 5:48 a.m. | OK | Python 3 | TESTS | 17 | 452 | 512000 | ||
171167993 | omthakare | B | Sept. 6, 2022, 7:49 p.m. | OK | Python 3 | TESTS | 17 | 452 | 5222400 | ||
171157315 | akshat11 | B | Sept. 6, 2022, 6:04 p.m. | OK | Python 3 | TESTS | 17 | 467 | 4403200 | ||
171179627 | wrick | B | Sept. 7, 2022, 12:01 a.m. | OK | Scala | TESTS | 17 | 498 | 0 | ||
171179686 | wrick | B | Sept. 7, 2022, 12:03 a.m. | OK | Scala | TESTS | 17 | 561 | 0 | ||
171176574 | wrick | B | Sept. 6, 2022, 10:37 p.m. | OK | Scala | TESTS | 17 | 561 | 0 | ||
171196711 | wrick | B | Sept. 7, 2022, 5:51 a.m. | OK | Scala | TESTS | 17 | 576 | 2457600 |
Back to search problems