Codeforces Round 934 (Div. 2)

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
1944 Codeforces Round 934 (Div. 2) FINISHED False 8700 26580263 March 16, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16609 ) B Equal XOR PROGRAMMING bitmasks constructive algorithms

B'You are given an array a of length 2n , consisting of each integer from 1 to n exactly twice. You are also given an integer k ( 1 <= q k <= q lfloor frac{n}{2} rfloor ). You need to find two arrays l and r each of length mathbf{2k} such that: It can be proved that at least one pair of l and r always exists. If there are multiple solutions, you may output any one of them. ^ dagger A sequence x is a subset of a sequence y if x can be obtained by deleting several (possibly none or all) elements of y and rearranging the elements in any order. For example, [3,1,2,1] , [1, 2, 3] , [1, 1] and [3, 2] are subsets of [1, 1, 2, 3] but [4] and [2, 2] are not subsets of [1, 1, 2, 3] . Each test contains multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 5000 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains 2 integers n and k ( 2 <= n <= 5 cdot 10^4 , 1 <= q k <= q lfloor frac{n}{2} rfloor ). The second line contains 2n integers a_1, a_2, ldots, a_{2n} ( 1 <= a_i <= n ). It is guaranteed that every integer from 1 to n occurs exactly twice in a . It is guaranteed that the sum of n over all test cases does not exceed 5 cdot 10^4 . For each test case, output two lines. On the first line of output, output 2k integers l_1, l_2, ldots, l_{2k} . On the second line of output, output 2k integers r_1, r_2, ldots r_{2k} . If there are multiple solutions, you may output any one of them. In the first test case, we choose l=[2,1] and r=[2,1] . [2, 1] is a subset of [a_1, a_2] and [2, 1] is a subset of [a_3, a_4] , and 2 oplus 1 = 2 oplus 1 = 3 . In the second test case, 6 oplus 4 = 1 op'...

Tutorials

Codeforces Round #934 (Div1, Div2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
251865158 Aderose_yr B March 17, 2024, 5:38 a.m. OK C++14 (GCC 6-32) TESTS 14 46 204800
251835874 23wlesq B March 16, 2024, 10:56 p.m. OK C++14 (GCC 6-32) TESTS 14 46 819200
251810042 Sunnetbayev B March 16, 2024, 6:59 p.m. OK C++14 (GCC 6-32) TESTS 14 46 819200
251853659 Zaid_Al_Habbal B March 17, 2024, 3:48 a.m. OK C++14 (GCC 6-32) TESTS 14 46 1433600
251853591 Zaid_Al_Habbal B March 17, 2024, 3:47 a.m. OK C++14 (GCC 6-32) TESTS 14 46 1433600
251784502 He_zheng B March 16, 2024, 4:39 p.m. OK C++14 (GCC 6-32) TESTS 14 46 1536000
251848274 cunni B March 17, 2024, 2:31 a.m. OK C++14 (GCC 6-32) TESTS 14 46 1843200
251849980 LETTERA B March 17, 2024, 2:57 a.m. OK C++14 (GCC 6-32) TESTS 14 46 1945600
251787275 Le_Gusto B March 16, 2024, 4:46 p.m. OK C++14 (GCC 6-32) TESTS 14 46 2150400
251801910 shubhamar B March 16, 2024, 6:32 p.m. OK C++14 (GCC 6-32) TESTS 14 46 2969600
251854537 Lemon-Tree B March 17, 2024, 3:58 a.m. OK C++17 (GCC 7-32) TESTS 14 46 204800
251852671 kkoushik5656 B March 17, 2024, 3:34 a.m. OK C++17 (GCC 7-32) TESTS 14 46 204800
251832195 A_G B March 16, 2024, 10:06 p.m. OK C++17 (GCC 7-32) TESTS 14 46 204800
251854569 heitai995 B March 17, 2024, 3:59 a.m. OK C++17 (GCC 7-32) TESTS 14 46 409600
251836701 abdo0_0ayman B March 16, 2024, 11:10 p.m. OK C++17 (GCC 7-32) TESTS 14 46 409600
251809406 rishabhdeepsingh B March 16, 2024, 6:55 p.m. OK C++17 (GCC 7-32) TESTS 14 46 409600
251816995 istiaqfuad B March 16, 2024, 7:53 p.m. OK C++17 (GCC 7-32) TESTS 14 46 819200
251807239 RakibJoy B March 16, 2024, 6:43 p.m. OK C++17 (GCC 7-32) TESTS 14 46 819200
251783083 lpratapsingh984 B March 16, 2024, 4:35 p.m. OK C++17 (GCC 7-32) TESTS 14 46 819200
251839531 perlentaucher B March 17, 2024, 12:03 a.m. OK C++17 (GCC 7-32) TESTS 14 46 921600
251856835 Kakaping7 B March 17, 2024, 4:24 a.m. OK GNU C11 TESTS 14 998 1024000
251861855 amit_roy B March 17, 2024, 5:13 a.m. OK Java 21 TESTS 14 280 204800
251856276 BishtCoder B March 17, 2024, 4:18 a.m. OK Java 21 TESTS 14 280 204800
251783871 ChrizzyB47 B March 16, 2024, 4:37 p.m. OK Java 21 TESTS 14 296 102400
251806961 bommidilaxman1017 B March 16, 2024, 6:41 p.m. OK Java 21 TESTS 14 327 3686400
251815115 HiddenBliz B March 16, 2024, 7:37 p.m. OK Java 21 TESTS 14 358 1024000
251788631 swatishivam23 B March 16, 2024, 4:49 p.m. OK Java 21 TESTS 14 358 6144000
251839919 Sagy13 B March 17, 2024, 12:11 a.m. OK Java 21 TESTS 14 374 3686400
251851851 priyaroy3370 B March 17, 2024, 3:24 a.m. OK Java 21 TESTS 14 389 18124800
251829104 mayank.nichlani22 B March 16, 2024, 9:34 p.m. OK Java 21 TESTS 14 405 1536000
251827464 krish0596 B March 16, 2024, 9:19 p.m. OK Java 21 TESTS 14 592 4096000
251837098 Yousef_Badr B March 16, 2024, 11:17 p.m. OK Java 8 TESTS 14 171 0
251837462 Yousef_Badr B March 16, 2024, 11:24 p.m. OK Java 8 TESTS 14 187 0
251832347 .diplo__mat B March 16, 2024, 10:08 p.m. OK Java 8 TESTS 14 233 66252800
251819945 Sumitsingh7 B March 16, 2024, 8:18 p.m. OK Java 8 TESTS 14 467 8192000
251781707 abbasslb B March 16, 2024, 4:32 p.m. OK Java 8 TESTS 14 577 0
251786842 2210030210 B March 16, 2024, 4:45 p.m. OK Java 8 TESTS 14 624 5324800
251783572 gotnoname B March 16, 2024, 4:36 p.m. OK Java 8 TESTS 14 639 5324800
251791388 lolwaCoder B March 16, 2024, 4:56 p.m. OK Java 8 TESTS 14 702 3891200
251787344 nischayaisynch B March 16, 2024, 4:46 p.m. OK Java 8 TESTS 14 702 5632000
251850894 ow3nL B March 17, 2024, 3:11 a.m. OK PyPy 3 TESTS 14 249 15872000
251785817 craisin B March 16, 2024, 4:42 p.m. OK PyPy 3 TESTS 14 358 10444800
251845285 nealzane B March 17, 2024, 1:43 a.m. OK PyPy 3 TESTS 14 436 15872000
251853376 zeroday1934 B March 17, 2024, 3:44 a.m. OK PyPy 3-64 TESTS 14 155 10035200
251831531 RobinFromTheHood B March 16, 2024, 9:58 p.m. OK PyPy 3-64 TESTS 14 171 15769600
251817149 gardengnome B March 16, 2024, 7:54 p.m. OK PyPy 3-64 TESTS 14 186 16998400
251859237 jvatsal0709 B March 17, 2024, 4:50 a.m. OK PyPy 3-64 TESTS 14 187 19251200
251788122 tro11ing B March 16, 2024, 4:48 p.m. OK PyPy 3-64 TESTS 14 217 14950400
251861236 sishenzhimu B March 17, 2024, 5:08 a.m. OK PyPy 3-64 TESTS 14 218 16179200
251848907 Lostgreen B March 17, 2024, 2:41 a.m. OK PyPy 3-64 TESTS 14 218 19968000
251845351 voicon B March 17, 2024, 1:44 a.m. OK PyPy 3-64 TESTS 14 233 16281600
251783076 Algorithms_ B March 16, 2024, 4:35 p.m. OK PyPy 3-64 TESTS 14 233 18022400
251785304 blackkarn B March 16, 2024, 4:40 p.m. OK PyPy 3-64 TESTS 14 248 16179200
251807340 OLOGY B March 16, 2024, 6:43 p.m. OK Python 2 TESTS 14 124 8396800
251866805 shantanu42 B March 17, 2024, 5:50 a.m. OK Python 3 TESTS 14 140 14438400
251846146 Ashu_5 B March 17, 2024, 1:58 a.m. OK Python 3 TESTS 14 155 14950400
251786858 TruongAnim B March 16, 2024, 4:45 p.m. OK Python 3 TESTS 14 170 16076800
251808602 Ratery B March 16, 2024, 6:50 p.m. OK Python 3 TESTS 14 171 14540800
251784056 Ashu_5 B March 16, 2024, 4:38 p.m. OK Python 3 TESTS 14 171 14950400
251857801 Samyak_15 B March 17, 2024, 4:36 a.m. OK Python 3 TESTS 14 186 13107200
251817285 Om_Singh_ B March 16, 2024, 7:55 p.m. OK Python 3 TESTS 14 187 14438400
251854430 Alex181098 B March 17, 2024, 3:57 a.m. OK Python 3 TESTS 14 187 16691200
251855187 R.khyathisri B March 17, 2024, 4:06 a.m. OK Python 3 TESTS 14 202 13107200
251783280 medfadiabaidi1 B March 16, 2024, 4:36 p.m. OK Python 3 TESTS 14 202 16281600

remove filters

Back to search problems