Codeforces Round 951 (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
1979 Codeforces Round 951 (Div. 2) FINISHED False 7200 19495463 June 6, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 23310 ) B XOR Sequences PROGRAMMING bitmasks greedy

B"You are given two distinct non-negative integers x and y . Consider two infinite sequences a_1, a_2, a_3, ldots and b_1, b_2, b_3, ldots , where Here, x oplus y denotes the bitwise XOR operation of integers x and y . For example, with x = 6 , the first 8 elements of sequence a will look as follows: [7, 4, 5, 2, 3, 0, 1, 14, ldots] . Note that the indices of elements start with 1 . Your task is to find the length of the longest common subsegment ^ dagger of sequences a and b . In other words, find the maximum integer m such that a_i = b_j, a_{i + 1} = b_{j + 1}, ldots, a_{i + m - 1} = b_{j + m - 1} for some i, j ge 1 . ^ dagger A subsegment of sequence p is a sequence p_l,p_{l+1}, ldots,p_r , where 1 <= l <= r . Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The only line of each test case contains two integers x and y ( 0 <= x, y <= 10^9, x neq y ) -- the parameters of the sequences. For each test case, output a single integer -- the length of the longest common subsegment. In the first test case, the first 7 elements of sequences a and b are as follows: a = [1, 2, 3, 4, 5, 6, 7, ldots] b = [0, 3, 2, 5, 4, 7, 6, ldots] It can be shown that there isn't a positive integer k such that the sequence [k, k + 1] occurs in b as a subsegment. So the answer is 1 . In the third test case, the first 20 elements of sequences a and b are as follows: a = [56, 59, 58, 61, 60, 63, 62, 49, 48, 51, 50, 53, 52, 55, 54, textbf{41, 40, 43, 42}, 45, ldots] b = [36, 39, 38, 33, 32, 35, 34, 45, 44, 47, 46, textbf{41, 40, 43, 42}, 53, 52, 55, 54, 49, ldots] It can be shown that one of the longest common sub"...

Tutorials

Codeforces Round 951 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
264514041 vishal2045ks B June 6, 2024, 8:42 p.m. OK C++14 (GCC 6-32) TESTS 5 31 0
264542443 LG805653 B June 7, 2024, 5:14 a.m. OK C++14 (GCC 6-32) TESTS 5 46 0
264539098 qifan_maker B June 7, 2024, 4:39 a.m. OK C++14 (GCC 6-32) TESTS 5 46 0
264537505 llzer B June 7, 2024, 4:22 a.m. OK C++14 (GCC 6-32) TESTS 5 46 0
264532441 NoGift B June 7, 2024, 3:16 a.m. OK C++14 (GCC 6-32) TESTS 5 46 0
264531923 Nitter B June 7, 2024, 3:09 a.m. OK C++14 (GCC 6-32) TESTS 5 46 0
264531627 jxin31415 B June 7, 2024, 3:05 a.m. OK C++14 (GCC 6-32) TESTS 5 46 0
264531343 Palok123 B June 7, 2024, 3:02 a.m. OK C++14 (GCC 6-32) TESTS 5 46 0
264529784 FBIWZH B June 7, 2024, 2:39 a.m. OK C++14 (GCC 6-32) TESTS 5 46 0
264529274 AbaKuS B June 7, 2024, 2:31 a.m. OK C++14 (GCC 6-32) TESTS 5 46 0
264535972 dhruvsha256 B June 7, 2024, 4:05 a.m. OK C++17 (GCC 7-32) TESTS 5 30 16076800
264526094 ashutosh__018 B June 7, 2024, 1:34 a.m. OK C++17 (GCC 7-32) TESTS 5 31 0
264542600 Z3R0_IQ B June 7, 2024, 5:15 a.m. OK C++17 (GCC 7-32) TESTS 5 31 0
264503663 Dolce_Banana B June 6, 2024, 6:35 p.m. OK C++17 (GCC 7-32) TESTS 5 31 0
264546811 Cx.330. B June 7, 2024, 5:55 a.m. OK C++17 (GCC 7-32) TESTS 5 46 0
264547534 vaibhavBhatia B June 7, 2024, 6 a.m. OK C++17 (GCC 7-32) TESTS 5 46 0
264547368 Hoangvu276 B June 7, 2024, 5:59 a.m. OK C++17 (GCC 7-32) TESTS 5 46 0
264547054 _Z0R0_ B June 7, 2024, 5:56 a.m. OK C++17 (GCC 7-32) TESTS 5 46 0
264546920 thomas_5791 B June 7, 2024, 5:55 a.m. OK C++17 (GCC 7-32) TESTS 5 46 0
264545985 Ohnose B June 7, 2024, 5:47 a.m. OK C++17 (GCC 7-32) TESTS 5 46 0
264529462 Duongkobeo B June 7, 2024, 2:34 a.m. OK C++20 (GCC 13-64) TESTS 5 30 0
264514597 meem_358 B June 6, 2024, 8:50 p.m. OK C++20 (GCC 13-64) TESTS 5 30 0
264526748 Floze3 B June 7, 2024, 1:48 a.m. OK C++20 (GCC 13-64) TESTS 5 30 102400
264529171 Giga_Cronos B June 7, 2024, 2:29 a.m. OK C++20 (GCC 13-64) TESTS 5 31 0
264527447 cleanser B June 7, 2024, 2:01 a.m. OK C++20 (GCC 13-64) TESTS 5 31 0
264498202 Oogway_ B June 6, 2024, 5:50 p.m. OK C++20 (GCC 13-64) TESTS 5 31 0
264527509 molongdadi B June 7, 2024, 2:02 a.m. OK C++20 (GCC 13-64) TESTS 5 31 102400
264546432 CLANCY-- B June 7, 2024, 5:52 a.m. OK C++20 (GCC 13-64) TESTS 5 46 0
264547483 Dishant_Padariya B June 7, 2024, 6 a.m. OK C++20 (GCC 13-64) TESTS 5 46 0
264546336 shahrukkabir01 B June 7, 2024, 5:51 a.m. OK C++20 (GCC 13-64) TESTS 5 46 0
264535266 bluemegane B June 7, 2024, 3:55 a.m. OK C# 8 TESTS 5 140 2048000
264516393 eugalt B June 6, 2024, 9:21 p.m. OK GNU C11 TESTS 5 46 102400
264545041 jayanth26 B June 7, 2024, 5:38 a.m. OK GNU C11 TESTS 5 77 0
264535192 I_need_7.0_IELTS B June 7, 2024, 3:54 a.m. OK GNU C11 TESTS 5 77 0
264541822 eh_Sami B June 7, 2024, 5:08 a.m. OK GNU C11 TESTS 5 92 0
264486423 Arun_sujith B June 6, 2024, 4:29 p.m. OK GNU C11 TESTS 5 92 0
264496155 iau_1371 B June 6, 2024, 5:37 p.m. OK GNU C11 TESTS 5 108 0
264493711 crapcode B June 6, 2024, 5:24 p.m. OK Go TESTS 5 61 512000
264531805 nguyenquocthao00 B June 7, 2024, 3:08 a.m. OK Go TESTS 5 62 819200
264510869 apoorveesinha B June 6, 2024, 7:58 p.m. OK Java 21 TESTS 5 218 0
264531280 sujalsharma_13 B June 7, 2024, 3:01 a.m. OK Java 21 TESTS 5 249 716800
264539663 Mg718 B June 7, 2024, 4:46 a.m. OK Java 21 TESTS 5 264 204800
264492778 himneesh9 B June 6, 2024, 5:20 p.m. OK Java 21 TESTS 5 265 307200
264540302 PoseidonXI B June 7, 2024, 4:52 a.m. OK Java 21 TESTS 5 265 307200
264526088 Zhanzhe_Lee B June 7, 2024, 1:34 a.m. OK Java 21 TESTS 5 281 204800
264485917 ItsLever B June 6, 2024, 4:28 p.m. OK Java 21 TESTS 5 296 0
264506933 dzhi B June 6, 2024, 7:10 p.m. OK Java 21 TESTS 5 296 204800
264531031 black_rise B June 7, 2024, 2:57 a.m. OK Java 21 TESTS 5 296 512000
264543529 relaxgameing20212012 B June 7, 2024, 5:24 a.m. OK Java 21 TESTS 5 296 819200
264501140 Blue_BEE B June 6, 2024, 6:13 p.m. OK Java 8 TESTS 5 124 0
264539531 coderman2004 B June 7, 2024, 4:44 a.m. OK Java 8 TESTS 5 171 0
264536610 marthapavan2002 B June 7, 2024, 4:13 a.m. OK Java 8 TESTS 5 218 0
264525599 desaizeeshan22 B June 7, 2024, 1:24 a.m. OK Java 8 TESTS 5 218 0
264510428 2manas1 B June 6, 2024, 7:53 p.m. OK Java 8 TESTS 5 218 0
264534996 darshanjk B June 7, 2024, 3:52 a.m. OK Java 8 TESTS 5 233 0
264489325 Deepini B June 6, 2024, 4:34 p.m. OK Java 8 TESTS 5 234 0
264538554 rjrajeevofficial B June 7, 2024, 4:33 a.m. OK Java 8 TESTS 5 249 0
264502607 abbasslb B June 6, 2024, 6:25 p.m. OK Java 8 TESTS 5 249 0
264486813 priya_padhi B June 6, 2024, 4:30 p.m. OK Java 8 TESTS 5 264 0
264486889 chrollo84 B June 6, 2024, 4:30 p.m. OK Node.js TESTS 5 250 9318400
264546636 Shaheer_SundarSTEM B June 7, 2024, 5:53 a.m. OK PyPy 3 TESTS 5 217 4198400
264545671 Vishesh2006 B June 7, 2024, 5:45 a.m. OK PyPy 3 TESTS 5 281 9932800
264499103 lo_krlo_baatt B June 6, 2024, 5:57 p.m. OK PyPy 3 TESTS 5 312 5632000
264487929 CbFb B June 6, 2024, 4:32 p.m. OK PyPy 3 TESTS 5 421 9523200
264540664 Youarenotgood B June 7, 2024, 4:55 a.m. OK PyPy 3-64 TESTS 5 92 2969600
264497307 gardengnome B June 6, 2024, 5:44 p.m. OK PyPy 3-64 TESTS 5 93 2969600
264511892 strashila B June 6, 2024, 8:12 p.m. OK PyPy 3-64 TESTS 5 93 3072000
264529030 mikeac B June 7, 2024, 2:27 a.m. OK PyPy 3-64 TESTS 5 108 3072000
264505742 MistaFlash B June 6, 2024, 6:58 p.m. OK PyPy 3-64 TESTS 5 108 3993600
264526272 smilences B June 7, 2024, 1:38 a.m. OK PyPy 3-64 TESTS 5 108 4096000
264502144 iedfa B June 6, 2024, 6:22 p.m. OK PyPy 3-64 TESTS 5 108 4300800
264508730 PhenomSG B June 6, 2024, 7:32 p.m. OK PyPy 3-64 TESTS 5 108 4505600
264505779 RobinFromTheHood B June 6, 2024, 6:58 p.m. OK PyPy 3-64 TESTS 5 124 3891200
264503481 burnerboy13 B June 6, 2024, 6:33 p.m. OK PyPy 3-64 TESTS 5 124 4096000
264524523 biltharesatyendra B June 7, 2024, 1 a.m. OK Python 2 TESTS 5 108 0
264488318 shrimppppp B June 6, 2024, 4:32 p.m. OK Python 3 TESTS 5 77 409600
264487039 ethical_03coding B June 6, 2024, 4:30 p.m. OK Python 3 TESTS 5 77 512000
264508981 eugalt B June 6, 2024, 7:35 p.m. OK Python 3 TESTS 5 77 614400
264545795 leelarishika B June 7, 2024, 5:46 a.m. OK Python 3 TESTS 5 93 512000
264488968 Sahithi_85 B June 6, 2024, 4:33 p.m. OK Python 3 TESTS 5 93 1536000
264486548 22wh1a6658 B June 6, 2024, 4:29 p.m. OK Python 3 TESTS 5 93 1536000
264486413 mahi0523 B June 6, 2024, 4:29 p.m. OK Python 3 TESTS 5 93 1536000
264514325 Uruguay B June 6, 2024, 8:46 p.m. OK Python 3 TESTS 5 108 0
264544986 veera_teja_007 B June 7, 2024, 5:38 a.m. OK Python 3 TESTS 5 109 0
264525655 ehabnasr406 B June 7, 2024, 1:25 a.m. OK Python 3 TESTS 5 109 0
264539600 vstiff B June 7, 2024, 4:45 a.m. OK Rust 2021 TESTS 5 46 0
264510189 atamakahere B June 6, 2024, 7:50 p.m. OK Rust 2021 TESTS 5 61 0

remove filters

Back to search problems