TypeDB Forces 2023 (Div. 1 + Div. 2, Rated, Prizes!)

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
1787 TypeDB Forces 2023 (Div. 1 + Div. 2, Rated, Prizes!) FINISHED False 10800 56820299 Jan. 29, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2371 ) E The Harmonization of XOR PROGRAMMING bitmasks constructive algorithms greedy math

B'You are given an array of exactly n numbers [1,2,3, ldots,n] along with integers k and x . Partition the array in exactly k non-empty disjoint subsequences such that the bitwise XOR of all numbers in each subsequence is x , and each number is in exactly one subsequence. Notice that there are no constraints on the length of each subsequence. A sequence a is a subsequence of a sequence b if a can be obtained from b by the deletion of several (possibly, zero or all) elements. For example, for n = 15 , k = 6 , x = 7 , the following scheme is valid: The following scheme is invalid, since 8 , 15 do not appear: The following scheme is invalid, since 3 appears twice, and 1 , 2 do not appear: Each test contains multiple test cases. The first line contains an integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first and the only line of each test case contains three integers n , k , x ( 1 <= k <= n <= 2 cdot 10^5 ; 1 <= x <= 10^9 ) -- the length of the array, the number of subsequences and the required XOR. It 's guaranteed that the sum of n does not exceed 2 cdot 10^5 . For each test case, if it is possible to partition the sequence, print "YES" in the first line. In the i -th of the following k lines first print the length s_i of the i -th subsequence, then print s_i integers, representing the elements in the i -th subsequence. If there are multiple answers, print any. Note that you can print a subsequence in any order. If it is not possible to partition the sequence, print "NO". In the first test case, we construct the following 6 subsequences: In the second test case, we construct the following 4 subsequences: The following solution is considered correct in this test case as well: '...

Tutorials

TypeDB Forces 2023 (Div. 1 + Div. 2, Rated, Prizes!) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
191162010 KumaTachiRen E Jan. 29, 2023, 5:29 p.m. OK C# 8 TESTS 29 202 22220800
191161170 Gassa E Jan. 29, 2023, 5:25 p.m. OK D TESTS 29 124 13721600
191201398 stOzenghaoweiOrz E Jan. 30, 2023, 3:50 a.m. OK GNU C++14 TESTS 29 31 1126400
191155330 ztlh E Jan. 29, 2023, 4:57 p.m. OK GNU C++14 TESTS 29 31 1638400
191154532 Soetdit E Jan. 29, 2023, 4:53 p.m. OK GNU C++14 TESTS 29 31 1843200
191193193 Z-301 E Jan. 30, 2023, 1:16 a.m. OK GNU C++14 TESTS 29 31 3379200
191157434 nmbb E Jan. 29, 2023, 5:07 p.m. OK GNU C++14 TESTS 29 31 3379200
191155026 RiCHEPCPR E Jan. 29, 2023, 4:55 p.m. OK GNU C++14 TESTS 29 31 46387200
191190289 nishkarsh E Jan. 29, 2023, 11:52 p.m. OK GNU C++14 TESTS 29 46 102400
191197420 yyf_0404 E Jan. 30, 2023, 2:44 a.m. OK GNU C++14 TESTS 29 46 204800
191194499 Feynn E Jan. 30, 2023, 1:47 a.m. OK GNU C++14 TESTS 29 46 409600
191156884 Exusiai_ E Jan. 29, 2023, 5:04 p.m. OK GNU C++14 TESTS 29 46 819200
191197108 TrivialMan E Jan. 30, 2023, 2:37 a.m. OK GNU C++17 TESTS 29 46 204800
191142816 KroosTheKeenGlint E Jan. 29, 2023, 4:02 p.m. OK GNU C++17 TESTS 29 46 204800
191163546 xpchf E Jan. 29, 2023, 5:34 p.m. OK GNU C++17 TESTS 29 46 1331200
191171410 CHY-2025 E Jan. 29, 2023, 6:57 p.m. OK GNU C++17 TESTS 29 46 1536000
191189737 Dd2dD2 E Jan. 29, 2023, 11:34 p.m. OK GNU C++17 TESTS 29 46 1638400
191169899 -skyline- E Jan. 29, 2023, 6:45 p.m. OK GNU C++17 TESTS 29 46 1638400
191153582 _RED__ E Jan. 29, 2023, 4:48 p.m. OK GNU C++17 TESTS 29 46 1638400
191182353 nnv-nick E Jan. 29, 2023, 9:04 p.m. OK GNU C++17 TESTS 29 46 1843200
191171271 forest E Jan. 29, 2023, 6:56 p.m. OK GNU C++17 TESTS 29 46 1843200
191169198 zzhrnoicansolve E Jan. 29, 2023, 6:40 p.m. OK GNU C++17 TESTS 29 46 1843200
191152882 gqf123 E Jan. 29, 2023, 4:45 p.m. OK GNU C++17 (64) TESTS 29 31 2355200
191144031 cuiaoxiang E Jan. 29, 2023, 4:06 p.m. OK GNU C++17 (64) TESTS 29 31 6144000
191152700 zhjxaoini E Jan. 29, 2023, 4:44 p.m. OK GNU C++17 (64) TESTS 29 31 6553600
191200632 Tadapally E Jan. 30, 2023, 3:37 a.m. OK GNU C++17 (64) TESTS 29 46 0
191185597 rainboy E Jan. 29, 2023, 9:58 p.m. OK GNU C++17 (64) TESTS 29 46 0
191142842 VladProg E Jan. 29, 2023, 4:02 p.m. OK GNU C++17 (64) TESTS 29 46 0
191145855 fatemetmhr E Jan. 29, 2023, 4:13 p.m. OK GNU C++17 (64) TESTS 29 46 512000
191154060 udon1206 E Jan. 29, 2023, 4:51 p.m. OK GNU C++17 (64) TESTS 29 46 3174400
191160323 Sheep_Li E Jan. 29, 2023, 5:21 p.m. OK GNU C++17 (64) TESTS 29 46 3276800
191143285 cage E Jan. 29, 2023, 4:03 p.m. OK GNU C++17 (64) TESTS 29 46 4403200
191156895 EMBailey E Jan. 29, 2023, 5:04 p.m. OK GNU C++20 (64) TESTS 29 30 2355200
191188019 vgtcross E Jan. 29, 2023, 10:50 p.m. OK GNU C++20 (64) TESTS 29 31 0
191187848 vgtcross E Jan. 29, 2023, 10:46 p.m. OK GNU C++20 (64) TESTS 29 31 0
191181486 mehrunesartem E Jan. 29, 2023, 8:51 p.m. OK GNU C++20 (64) TESTS 29 31 0
191181139 mehrunesartem E Jan. 29, 2023, 8:46 p.m. OK GNU C++20 (64) TESTS 29 31 0
191146734 ecnerwala E Jan. 29, 2023, 4:17 p.m. OK GNU C++20 (64) TESTS 29 31 0
191162188 chengbilly E Jan. 29, 2023, 5:29 p.m. OK GNU C++20 (64) TESTS 29 31 204800
191185680 ScarletS E Jan. 29, 2023, 10 p.m. OK GNU C++20 (64) TESTS 29 31 1126400
191176451 mehrunesartem E Jan. 29, 2023, 7:47 p.m. OK GNU C++20 (64) TESTS 29 31 1638400
191175561 mehrunesartem E Jan. 29, 2023, 7:37 p.m. OK GNU C++20 (64) TESTS 29 31 1843200
191202696 Dinesh_Pandiyan E Jan. 30, 2023, 4:11 a.m. OK Java 11 TESTS 29 280 14950400
191153195 profchi E Jan. 29, 2023, 4:47 p.m. OK Java 11 TESTS 29 280 14950400
191159719 pc_invader E Jan. 29, 2023, 5:18 p.m. OK Java 17 TESTS 29 296 16384000
191173749 this.is.shivamsingh E Jan. 29, 2023, 7:18 p.m. OK Java 17 TESTS 29 342 16486400
191169128 Dukkha E Jan. 29, 2023, 6:40 p.m. OK Java 17 TESTS 29 374 1331200
191171808 golions E Jan. 29, 2023, 7:01 p.m. OK Java 8 TESTS 29 326 20377600
191204048 IanISam E Jan. 30, 2023, 4:36 a.m. OK Java 8 TESTS 29 343 10240000
191147493 ComPhyPark E Jan. 29, 2023, 4:21 p.m. OK MS C++ 2017 TESTS 29 93 6348800
191156949 misorin E Jan. 29, 2023, 5:04 p.m. OK PyPy 3 TESTS 29 264 23756800
191147674 SPD_9X2 E Jan. 29, 2023, 4:21 p.m. OK PyPy 3 TESTS 29 265 19968000
191200047 bpdolson E Jan. 30, 2023, 3:27 a.m. OK PyPy 3 TESTS 29 499 14131200
191144391 toam E Jan. 29, 2023, 4:08 p.m. OK PyPy 3-64 TESTS 29 249 25600000
191174255 huikang E Jan. 29, 2023, 7:23 p.m. OK PyPy 3-64 TESTS 29 249 37990400
191161200 WitchOfTruth E Jan. 29, 2023, 5:25 p.m. OK PyPy 3-64 TESTS 29 264 26828800
191152227 xxh1999 E Jan. 29, 2023, 4:42 p.m. OK PyPy 3-64 TESTS 29 280 25702400
191171613 sushmanth.dampur8780 E Jan. 29, 2023, 6:59 p.m. OK PyPy 3-64 TESTS 29 280 26009600
191173552 Th_K E Jan. 29, 2023, 7:16 p.m. OK PyPy 3-64 TESTS 29 296 25600000
191203214 NINGucas E Jan. 30, 2023, 4:21 a.m. OK PyPy 3-64 TESTS 29 311 27033600
191146574 Ana_naS E Jan. 29, 2023, 4:16 p.m. OK PyPy 3-64 TESTS 29 327 22732800
191170638 dgrachev28 E Jan. 29, 2023, 6:50 p.m. OK PyPy 3-64 TESTS 29 327 150118400
191150538 titia E Jan. 29, 2023, 4:34 p.m. OK PyPy 3-64 TESTS 29 342 29696000
191151087 Jimanbanashi E Jan. 29, 2023, 4:36 p.m. OK Python 2 TESTS 29 218 819200

remove filters

Back to search problems