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. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1867 ) | D2 | Xor-Subsequence (hard version) | PROGRAMMING | bitmasks data structures dp strings trees |
B'It is the hard version of the problem. The only difference is that in this version a_i <= 10^9 . 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 10^9 ) -- 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 . '... |
Codeforces Round #815 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
168911456 | huaruoji | D2 | Aug. 19, 2022, 2:48 a.m. | OK | GNU C++14 | TESTS | 74 | 171 | 145510400 | ||
168920769 | jianguolinyun | D2 | Aug. 19, 2022, 5:14 a.m. | OK | GNU C++14 | TESTS | 75 | 202 | 157081600 | ||
168909997 | zzlzzlzzl | D2 | Aug. 19, 2022, 2:22 a.m. | OK | GNU C++14 | TESTS | 74 | 217 | 153804800 | ||
168920173 | Max_s_xaM | D2 | Aug. 19, 2022, 5:07 a.m. | OK | GNU C++14 | TESTS | 75 | 218 | 145510400 | ||
168876009 | CK2021 | D2 | Aug. 18, 2022, 5:24 p.m. | OK | GNU C++14 | TESTS | 72 | 218 | 155136000 | ||
168923182 | alkido | D2 | Aug. 19, 2022, 5:43 a.m. | OK | GNU C++14 | TESTS | 75 | 233 | 144281600 | ||
168904694 | CoachDanke | D2 | Aug. 19, 2022, 12:33 a.m. | OK | GNU C++14 | TESTS | 73 | 234 | 161484800 | ||
168911391 | Unique_Hanpi | D2 | Aug. 19, 2022, 2:47 a.m. | OK | GNU C++14 | TESTS | 74 | 249 | 194764800 | ||
168862873 | Leasier | D2 | Aug. 18, 2022, 3:31 p.m. | OK | GNU C++14 | TESTS | 72 | 249 | 218828800 | ||
168920063 | nullccxsysiyi | D2 | Aug. 19, 2022, 5:05 a.m. | OK | GNU C++14 | TESTS | 75 | 249 | 300646400 | ||
168892940 | Bobocan | D2 | Aug. 18, 2022, 8:11 p.m. | OK | GNU C++17 | TESTS | 73 | 187 | 144793600 | ||
168892753 | Bobocan | D2 | Aug. 18, 2022, 8:08 p.m. | OK | GNU C++17 | TESTS | 73 | 187 | 144793600 | ||
168892317 | Bobocan | D2 | Aug. 18, 2022, 8:03 p.m. | OK | GNU C++17 | TESTS | 73 | 233 | 144793600 | ||
168915307 | gs17005 | D2 | Aug. 19, 2022, 3:51 a.m. | OK | GNU C++17 | TESTS | 74 | 249 | 145510400 | ||
168909810 | LimitedLife | D2 | Aug. 19, 2022, 2:20 a.m. | OK | GNU C++17 | TESTS | 74 | 249 | 145510400 | ||
168901643 | HunterCoder | D2 | Aug. 18, 2022, 11:08 p.m. | OK | GNU C++17 | TESTS | 73 | 249 | 145510400 | ||
168901616 | HunterCoder | D2 | Aug. 18, 2022, 11:07 p.m. | OK | GNU C++17 | TESTS | 73 | 249 | 145510400 | ||
168869075 | rdstihz | D2 | Aug. 18, 2022, 4:40 p.m. | OK | GNU C++17 | TESTS | 72 | 249 | 146739200 | ||
168913089 | stff577 | D2 | Aug. 19, 2022, 3:16 a.m. | OK | GNU C++17 | TESTS | 74 | 249 | 149094400 | ||
168918202 | RetARDed1111 | D2 | Aug. 19, 2022, 4:38 a.m. | OK | GNU C++17 | TESTS | 74 | 249 | 151552000 | ||
168913903 | ExplodingKonjac | D2 | Aug. 19, 2022, 3:28 a.m. | OK | GNU C++17 (64) | TESTS | 74 | 187 | 248832000 | ||
168883360 | propane | D2 | Aug. 18, 2022, 6:25 p.m. | OK | GNU C++17 (64) | TESTS | 72 | 202 | 150323200 | ||
168906980 | ExplodingKonjac | D2 | Aug. 19, 2022, 1:24 a.m. | OK | GNU C++17 (64) | TESTS | 74 | 202 | 248832000 | ||
168922306 | Sana | D2 | Aug. 19, 2022, 5:33 a.m. | OK | GNU C++17 (64) | TESTS | 75 | 217 | 99840000 | ||
168920090 | wqy2022 | D2 | Aug. 19, 2022, 5:05 a.m. | OK | GNU C++17 (64) | TESTS | 75 | 217 | 187596800 | ||
168913004 | Haven_ | D2 | Aug. 19, 2022, 3:15 a.m. | OK | GNU C++17 (64) | TESTS | 74 | 218 | 151552000 | ||
168919841 | -wicton- | D2 | Aug. 19, 2022, 5:03 a.m. | OK | GNU C++17 (64) | TESTS | 75 | 218 | 155136000 | ||
168924925 | euoao | D2 | Aug. 19, 2022, 6:02 a.m. | OK | GNU C++17 (64) | TESTS | 75 | 218 | 162713600 | ||
168911733 | DjTang | D2 | Aug. 19, 2022, 2:54 a.m. | OK | GNU C++17 (64) | TESTS | 74 | 248 | 298188800 | ||
168914771 | iamone | D2 | Aug. 19, 2022, 3:41 a.m. | OK | GNU C++17 (64) | TESTS | 74 | 248 | 483328000 | ||
168911433 | zzxzzx123 | D2 | Aug. 19, 2022, 2:48 a.m. | OK | GNU C++20 (64) | TESTS | 74 | 186 | 145510400 | ||
168913474 | zzxzzx123 | D2 | Aug. 19, 2022, 3:22 a.m. | OK | GNU C++20 (64) | TESTS | 74 | 202 | 145510400 | ||
168909793 | zzxzzx123 | D2 | Aug. 19, 2022, 2:19 a.m. | OK | GNU C++20 (64) | TESTS | 74 | 202 | 145510400 | ||
168890419 | altman | D2 | Aug. 18, 2022, 7:40 p.m. | OK | GNU C++20 (64) | TESTS | 73 | 202 | 145510400 | ||
168907429 | Mryange | D2 | Aug. 19, 2022, 1:34 a.m. | OK | GNU C++20 (64) | TESTS | 74 | 202 | 161894400 | ||
168907316 | Mryange | D2 | Aug. 19, 2022, 1:32 a.m. | OK | GNU C++20 (64) | TESTS | 74 | 202 | 161894400 | ||
168904373 | Mryange | D2 | Aug. 19, 2022, 12:24 a.m. | OK | GNU C++20 (64) | TESTS | 73 | 217 | 161894400 | ||
168909588 | Mrokure | D2 | Aug. 19, 2022, 2:15 a.m. | OK | GNU C++20 (64) | TESTS | 74 | 218 | 98611200 | ||
168905330 | ofcoursenotsh | D2 | Aug. 19, 2022, 12:48 a.m. | OK | GNU C++20 (64) | TESTS | 73 | 218 | 105267200 | ||
168919161 | NRolly | D2 | Aug. 19, 2022, 4:53 a.m. | OK | GNU C++20 (64) | TESTS | 75 | 218 | 145510400 | ||
168880646 | Dukkha | D2 | Aug. 18, 2022, 6 p.m. | OK | Java 17 | TESTS | 72 | 436 | 211148800 | ||
168880618 | Dukkha | D2 | Aug. 18, 2022, 6 p.m. | OK | Java 8 | TESTS | 72 | 374 | 207257600 | ||
168861208 | omniglot | D2 | Aug. 18, 2022, 3:27 p.m. | OK | Java 8 | TESTS | 72 | 857 | 488652800 | ||
168918486 | liomsv | D2 | Aug. 19, 2022, 4:43 a.m. | OK | Java 8 | TESTS | 75 | 1450 | 125030400 | ||
168917548 | kun2605879979 | D2 | Aug. 19, 2022, 4:28 a.m. | OK | MS C++ 2017 | TESTS | 74 | 608 | 151552000 | ||
168874758 | LittleFall | D2 | Aug. 18, 2022, 5:15 p.m. | OK | Rust 2021 | TESTS | 72 | 561 | 515072000 | ||
168862937 | LittleCyan | D2 | Aug. 18, 2022, 3:31 p.m. | OK | Rust 2021 | TESTS | 72 | 561 | 515072000 |
Back to search problems