Codeforces Round 815 (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
1720 Codeforces Round 815 (Div. 2) FINISHED False 7200 70993499 Aug. 18, 2022, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6051 ) D1 Xor-Subsequence (easy version) PROGRAMMING bitmasks brute force dp strings trees

B'It is the easy version of the problem. The only difference is that in this version a_i <= 200 . You are given an array of n integers a_0, a_1, a_2, ldots a_{n - 1} . Bryap wants to find the longest beautiful subsequence in the array. An array b = [b_0, b_1, ldots, b_{m-1}] , where 0 <= b_0 < b_1 < ldots < b_{m - 1} < n , is a subsequence of length m of the array a . Subsequence b = [b_0, b_1, ldots, b_{m-1}] of length m is called beautiful, if the following condition holds: Here a oplus b denotes the bitwise XOR of a and b . For example, 2 oplus 4 = 6 and 3 oplus 1=2 . Bryap is a simple person so he only wants to know the length of the longest such subsequence. Help Bryap and find the answer to his question. The first line contains a single integer t ( 1 <= q t <= q 10^5 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n ( 2 <= q n <= q 3 cdot 10^5 ) -- the length of the array. The second line of each test case contains n integers a_0,a_1,...,a_{n-1} ( 0 <= q a_i <= q 200 ) -- the elements of the array. It is guaranteed that the sum of n over all test cases does not exceed 3 cdot 10^5 . For each test case print a single integer -- the length of the longest beautiful subsequence. In the first test case, we can pick the whole array as a beautiful subsequence because 1 oplus 1 < 2 oplus 0 . In the second test case, we can pick elements with indexes 1 , 2 and 4 (in 0 -indexation). For this elements holds: 2 oplus 2 < 4 oplus 1 and 4 oplus 4 < 1 oplus 2 . '...

Tutorials

Codeforces Round #815 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
168917830 luyifan D1 Aug. 19, 2022, 4:32 a.m. OK Clang++20 Diagnostics TESTS 121 1684 3072000
168923106 ruban D1 Aug. 19, 2022, 5:42 a.m. OK Delphi TESTS 121 514 19353600
168920795 jianguolinyun D1 Aug. 19, 2022, 5:15 a.m. OK GNU C++14 TESTS 121 78 157081600
168920146 Max_s_xaM D1 Aug. 19, 2022, 5:06 a.m. OK GNU C++14 TESTS 121 124 145510400
168890294 dmenezes D1 Aug. 18, 2022, 7:39 p.m. OK GNU C++14 TESTS 120 124 145510400
168911567 xianrui5891 D1 Aug. 19, 2022, 2:50 a.m. OK GNU C++14 TESTS 120 124 155136000
168923774 Tom66 D1 Aug. 19, 2022, 5:50 a.m. OK GNU C++14 TESTS 121 124 160256000
168915358 Duck_sajin D1 Aug. 19, 2022, 3:52 a.m. OK GNU C++14 TESTS 121 124 162713600
168896064 Rebirth D1 Aug. 18, 2022, 8:59 p.m. OK GNU C++14 TESTS 120 124 482201600
168913965 Dilute D1 Aug. 19, 2022, 3:29 a.m. OK GNU C++14 TESTS 120 124 483328000
168906057 huaruoji D1 Aug. 19, 2022, 1:05 a.m. OK GNU C++14 TESTS 120 140 2457600
168917362 acacaction D1 Aug. 19, 2022, 4:25 a.m. OK GNU C++14 TESTS 121 140 224870400
168918179 RetARDed1111 D1 Aug. 19, 2022, 4:38 a.m. OK GNU C++17 TESTS 121 124 151552000
168868041 rdstihz D1 Aug. 18, 2022, 4:37 p.m. OK GNU C++17 TESTS 119 140 146739200
168921785 TsReaper D1 Aug. 19, 2022, 5:27 a.m. OK GNU C++17 TESTS 121 140 150323200
168922818 Liberty_gsm D1 Aug. 19, 2022, 5:39 a.m. OK GNU C++17 TESTS 121 140 151552000
168892037 mehrzad_minaei D1 Aug. 18, 2022, 7:59 p.m. OK GNU C++17 TESTS 120 140 218828800
168917446 duoluoluo D1 Aug. 19, 2022, 4:26 a.m. OK GNU C++17 TESTS 121 140 224870400
168918561 LiAnG24 D1 Aug. 19, 2022, 4:44 a.m. OK GNU C++17 TESTS 121 140 260505600
168861598 utk D1 Aug. 18, 2022, 3:28 p.m. OK GNU C++17 TESTS 119 155 45977600
168914582 binglengmo D1 Aug. 19, 2022, 3:38 a.m. OK GNU C++17 TESTS 120 155 114585600
168869724 Omer223 D1 Aug. 18, 2022, 4:43 p.m. OK GNU C++17 TESTS 119 156 27648000
168913872 ExplodingKonjac D1 Aug. 19, 2022, 3:27 a.m. OK GNU C++17 (64) TESTS 120 78 248832000
168906996 ExplodingKonjac D1 Aug. 19, 2022, 1:25 a.m. OK GNU C++17 (64) TESTS 120 78 248832000
168922294 Sana D1 Aug. 19, 2022, 5:33 a.m. OK GNU C++17 (64) TESTS 121 93 99840000
168919863 -wicton- D1 Aug. 19, 2022, 5:03 a.m. OK GNU C++17 (64) TESTS 121 93 155136000
168868834 CharlesWuQiushi D1 Aug. 18, 2022, 4:39 p.m. OK GNU C++17 (64) TESTS 119 109 149094400
168913811 No-Rain D1 Aug. 19, 2022, 3:27 a.m. OK GNU C++17 (64) TESTS 120 109 156876800
168915080 pvzelyyds D1 Aug. 19, 2022, 3:47 a.m. OK GNU C++17 (64) TESTS 120 109 223641600
168914754 iamone D1 Aug. 19, 2022, 3:41 a.m. OK GNU C++17 (64) TESTS 120 109 483328000
168864242 linxd D1 Aug. 18, 2022, 3:34 p.m. OK GNU C++17 (64) TESTS 119 124 48128000
168911867 haha_ha D1 Aug. 19, 2022, 2:56 a.m. OK GNU C++17 (64) TESTS 120 124 293376000
168905327 ofcoursenotsh D1 Aug. 19, 2022, 12:48 a.m. OK GNU C++20 (64) TESTS 120 78 105267200
168919174 NRolly D1 Aug. 19, 2022, 4:53 a.m. OK GNU C++20 (64) TESTS 121 93 145510400
168861020 Randias D1 Aug. 18, 2022, 3:27 p.m. OK GNU C++20 (64) TESTS 119 108 146739200
168892138 heng- D1 Aug. 18, 2022, 8 p.m. OK GNU C++20 (64) TESTS 120 109 145510400
168903282 Forza_Ferrari D1 Aug. 18, 2022, 11:55 p.m. OK GNU C++20 (64) TESTS 120 109 146636800
168920320 WYL0zhu D1 Aug. 19, 2022, 5:08 a.m. OK GNU C++20 (64) TESTS 121 109 150220800
168919058 RemoveFST D1 Aug. 19, 2022, 4:52 a.m. OK GNU C++20 (64) TESTS 121 109 405811200
168907957 ZJC123 D1 Aug. 19, 2022, 1:44 a.m. OK GNU C++20 (64) TESTS 120 124 2457600
168907748 ZJC123 D1 Aug. 19, 2022, 1:40 a.m. OK GNU C++20 (64) TESTS 120 124 2457600
168910883 lprdsb D1 Aug. 19, 2022, 2:39 a.m. OK GNU C++20 (64) TESTS 120 124 39424000
168886870 rwee1001 D1 Aug. 18, 2022, 7:01 p.m. OK Java 11 TESTS 120 404 0
168870289 gurkaran_s D1 Aug. 18, 2022, 4:46 p.m. OK Java 11 TESTS 119 405 0
168868720 Sikander_2000 D1 Aug. 18, 2022, 4:39 p.m. OK Java 11 TESTS 119 405 0
168868740 profchi D1 Aug. 18, 2022, 4:39 p.m. OK Java 11 TESTS 119 436 0
168859949 TCchen D1 Aug. 18, 2022, 3:24 p.m. OK Java 11 TESTS 119 467 0
168869509 Wuya D1 Aug. 18, 2022, 4:42 p.m. OK Java 11 TESTS 119 498 20889600
168861808 def_not_alt D1 Aug. 18, 2022, 3:29 p.m. OK Java 11 TESTS 119 530 0
168870109 csullivan203 D1 Aug. 18, 2022, 4:45 p.m. OK Java 11 TESTS 119 545 0
168885335 AyushS_cg170 D1 Aug. 18, 2022, 6:44 p.m. OK Java 11 TESTS 120 716 20582400
168869559 merlin_ D1 Aug. 18, 2022, 4:42 p.m. OK Java 11 TESTS 119 748 20684800
168880701 Dukkha D1 Aug. 18, 2022, 6:01 p.m. OK Java 17 TESTS 120 343 211456000
168913333 Mamimi D1 Aug. 19, 2022, 3:20 a.m. OK Java 17 TESTS 120 545 1228800
168880564 Dukkha D1 Aug. 18, 2022, 6 p.m. OK Java 8 TESTS 120 280 207257600
168911720 frey4 D1 Aug. 19, 2022, 2:53 a.m. OK Java 8 TESTS 120 311 0
168877602 anshulchou_123 D1 Aug. 18, 2022, 5:37 p.m. OK Java 8 TESTS 120 421 0
168889209 O_E D1 Aug. 18, 2022, 7:27 p.m. OK Java 8 TESTS 120 436 0
168886649 ND_ D1 Aug. 18, 2022, 6:59 p.m. OK Java 8 TESTS 120 498 0
168876558 ikillmyself D1 Aug. 18, 2022, 5:29 p.m. OK Java 8 TESTS 120 545 0
168868163 ggghg D1 Aug. 18, 2022, 4:37 p.m. OK Java 8 TESTS 119 577 0
168871335 UniversalAdmin D1 Aug. 18, 2022, 4:52 p.m. OK Java 8 TESTS 119 592 0
168871232 Admin07 D1 Aug. 18, 2022, 4:52 p.m. OK Java 8 TESTS 119 592 0
168859999 liomsv D1 Aug. 18, 2022, 3:25 p.m. OK Java 8 TESTS 119 623 0
168868991 misaka12435 D1 Aug. 18, 2022, 4:40 p.m. OK MS C++ 2017 TESTS 119 234 3584000
168907148 hua_yi_jiu D1 Aug. 19, 2022, 1:28 a.m. OK MS C++ 2017 TESTS 120 234 7987200
168910101 kun2605879979 D1 Aug. 19, 2022, 2:24 a.m. OK MS C++ 2017 TESTS 120 405 4812800
168873439 1_2_3_4_5_9 D1 Aug. 18, 2022, 5:06 p.m. OK PyPy 2 TESTS 120 1590 28979200
168909076 lol_py D1 Aug. 19, 2022, 2:05 a.m. OK PyPy 3 TESTS 120 920 20275200
168879535 rkyrahulkumar D1 Aug. 18, 2022, 5:52 p.m. OK PyPy 3 TESTS 120 982 19251200
168887803 depressed_UG D1 Aug. 18, 2022, 7:11 p.m. OK PyPy 3 TESTS 120 1044 24064000
168872656 godalgoman D1 Aug. 18, 2022, 5:01 p.m. OK PyPy 3 TESTS 120 1809 47616000
168862649 aberent D1 Aug. 18, 2022, 3:31 p.m. OK PyPy 3-64 TESTS 119 233 26112000
168871963 hkwu6013 D1 Aug. 18, 2022, 4:56 p.m. OK PyPy 3-64 TESTS 120 467 30720000
168862002 Leocosmos D1 Aug. 18, 2022, 3:29 p.m. OK PyPy 3-64 TESTS 119 467 36044800
168897066 HETRAKESHFADIA D1 Aug. 18, 2022, 9:16 p.m. OK PyPy 3-64 TESTS 120 624 26112000
168906752 sevenog D1 Aug. 19, 2022, 1:20 a.m. OK PyPy 3-64 TESTS 120 655 37683200
168897051 HETRAKESHFADIA D1 Aug. 18, 2022, 9:16 p.m. OK PyPy 3-64 TESTS 120 685 26112000
168902087 NINGucas D1 Aug. 18, 2022, 11:21 p.m. OK PyPy 3-64 TESTS 120 702 34918400
168910436 zhenfisher D1 Aug. 19, 2022, 2:30 a.m. OK PyPy 3-64 TESTS 120 717 37990400
168869433 SophieHatter D1 Aug. 18, 2022, 4:42 p.m. OK PyPy 3-64 TESTS 119 732 38707200
168862283 dougn711 D1 Aug. 18, 2022, 3:30 p.m. OK PyPy 3-64 TESTS 119 748 37990400
168910613 xttt D1 Aug. 19, 2022, 2:34 a.m. OK Rust 2021 TESTS 120 140 6758400
168913600 kena0ki D1 Aug. 19, 2022, 3:24 a.m. OK Rust 2021 TESTS 120 171 9523200
168874630 LittleFall D1 Aug. 18, 2022, 5:14 p.m. OK Rust 2021 TESTS 120 187 5734400
168889513 NetravatPendsey D1 Aug. 18, 2022, 7:30 p.m. OK Rust 2021 TESTS 120 187 9420800
168869002 robostac D1 Aug. 18, 2022, 4:40 p.m. OK Rust 2021 TESTS 119 264 9523200
168860867 NetravatPendsey D1 Aug. 18, 2022, 3:26 p.m. OK Rust 2021 TESTS 119 873 205107200

remove filters

Back to search problems