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 |
---|---|---|---|---|---|---|
1030 | Technocup 2019 - Elimination Round 1 | FINISHED | False | 7200 | 199817723 | Sept. 23, 2018, 1:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3140 ) | E | Vasya and Good Sequences | PROGRAMMING | bitmasks dp | 2100 |
B"Vasya has a sequence a consisting of n integers a_1, a_2, ... , a_n . Vasya may pefrom the following operation: choose some number from the sequence and swap any pair of bits in its binary representation. For example, Vasya can transform number 6 ( ... 00000000110_2) into 3 ( ... 00000000011_2) , 12 ( ... 000000001100_2) , 1026 ( ... 10000000010_2) and many others. Vasya can use this operation any (possibly zero) number of times on any number from the sequence. Vasya names a sequence as good one, if, using operation mentioned above, he can obtain the sequence with bitwise exclusive or of all elements equal to 0 . For the given sequence a_1, a_2, ldots, a_n Vasya'd like to calculate number of integer pairs (l, r) such that 1 <= l <= r <= n and sequence a_l, a_{l + 1}, ... , a_r is good. The first line contains a single integer n ( 1 <= n <= 3 cdot 10^5 ) -- length of the sequence. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^{18} ) -- the sequence a . Print one integer -- the number of pairs (l, r) such that 1 <= l <= r <= n and the sequence a_l, a_{l + 1}, ... , a_r is good. In the first example pairs (2, 3) and (1, 3) are valid. Pair (2, 3) is valid since a_2 = 7 rightarrow 11 , a_3 = 14 rightarrow 11 and 11 oplus 11 = 0 , where oplus -- bitwise exclusive or. Pair (1, 3) is valid since a_1 = 6 rightarrow 3 , a_2 = 7 rightarrow 13 , a_3 = 14 rightarrow 14 and 3 oplus 13 oplus 14 = 0 . In the second example pairs (1, 2) , (2, 3) , (3, 4) and (1, 4) are valid. "... |
Сodeforces Round 512 (and Technocup — Elimination Round 1) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
43723928 | luogu_bot5 | E | Oct. 3, 2018, 11:19 a.m. | OK | FPC | TESTS | 66 | 265 | 4812800 | 2100 | |
43622711 | Kael007 | E | Sept. 30, 2018, 8:09 p.m. | OK | FPC | TESTS | 66 | 483 | 24064000 | 2100 | |
44490289 | p_b_p_b | E | Oct. 18, 2018, 2:13 p.m. | OK | GNU C++11 | TESTS | 66 | 78 | 2457600 | 2100 | |
44490259 | luogu_bot2 | E | Oct. 18, 2018, 2:12 p.m. | OK | GNU C++11 | TESTS | 66 | 78 | 2457600 | 2100 | |
43391327 | __Darkmoon | E | Sept. 25, 2018, 1:26 a.m. | OK | GNU C++11 | TESTS | 66 | 78 | 6246400 | 2100 | |
43718971 | skylee | E | Oct. 3, 2018, 8:58 a.m. | OK | GNU C++11 | TESTS | 66 | 93 | 2252800 | 2100 | |
65445848 | 910306264 | E | Nov. 20, 2019, 3:57 p.m. | OK | GNU C++11 | TESTS | 66 | 93 | 3481600 | 2100 | |
43619553 | Matrix.code | E | Sept. 30, 2018, 6:21 p.m. | OK | GNU C++11 | TESTS | 66 | 93 | 6041600 | 2100 | |
43358191 | _Dispwnl | E | Sept. 24, 2018, 7:40 a.m. | OK | GNU C++11 | TESTS | 66 | 93 | 7270400 | 2100 | |
43358155 | _Dispwnl | E | Sept. 24, 2018, 7:38 a.m. | OK | GNU C++11 | TESTS | 66 | 93 | 7270400 | 2100 | |
43902271 | nowhere132 | E | Oct. 6, 2018, 12:54 p.m. | OK | GNU C++11 | TESTS | 66 | 108 | 9625600 | 2100 | |
43349043 | _CZH | E | Sept. 23, 2018, 11:56 p.m. | OK | GNU C++11 | TESTS | 66 | 109 | 3481600 | 2100 | |
44751745 | ReaLNero1 | E | Oct. 23, 2018, 8:19 p.m. | OK | GNU C++14 | TESTS | 66 | 78 | 7168000 | 2100 | |
43356238 | tmwilliamlin168 | E | Sept. 24, 2018, 6:31 a.m. | OK | GNU C++14 | TESTS | 66 | 155 | 1536000 | 2100 | |
43335227 | I_love_QMsh | E | Sept. 23, 2018, 3:03 p.m. | OK | GNU C++14 | TESTS | 66 | 155 | 4812800 | 2100 | |
47791637 | rawatds | E | Dec. 31, 2018, 1:49 p.m. | OK | GNU C++14 | TESTS | 66 | 155 | 6041600 | 2100 | |
45464686 | mehul1999k | E | Nov. 9, 2018, 5:13 a.m. | OK | GNU C++14 | TESTS | 66 | 155 | 6041600 | 2100 | |
45338815 | priyanshu_sing | E | Nov. 5, 2018, 7:14 p.m. | OK | GNU C++14 | TESTS | 66 | 155 | 6041600 | 2100 | |
44618650 | Creativich | E | Oct. 21, 2018, 4:32 a.m. | OK | GNU C++14 | TESTS | 66 | 155 | 6041600 | 2100 | |
52921331 | yelghareeb | E | April 17, 2019, 5:59 p.m. | OK | GNU C++14 | TESTS | 66 | 155 | 7270400 | 2100 | |
51109835 | AMnu | E | March 10, 2019, 3:22 a.m. | OK | GNU C++14 | TESTS | 66 | 156 | 1228800 | 2100 | |
61723766 | juggernaut | E | Oct. 2, 2019, 2:36 p.m. | OK | GNU C++14 | TESTS | 66 | 156 | 6041600 | 2100 | |
45177914 | Kiki.Do.You.Love.Me | E | Nov. 1, 2018, 3:40 p.m. | OK | GNU C++17 | TESTS | 66 | 77 | 7475200 | 2100 | |
43362829 | BagishovMikail | E | Sept. 24, 2018, 10:34 a.m. | OK | GNU C++17 | TESTS | 66 | 78 | 33894400 | 2100 | |
43500959 | UnstoppableChillMachine | E | Sept. 27, 2018, 5:05 p.m. | OK | GNU C++17 | TESTS | 66 | 140 | 4812800 | 2100 | |
44098307 | biaoge | E | Oct. 11, 2018, 3:32 a.m. | OK | GNU C++17 | TESTS | 66 | 156 | 1228800 | 2100 | |
44070652 | Icceey | E | Oct. 10, 2018, 11:30 a.m. | OK | GNU C++17 | TESTS | 66 | 156 | 1228800 | 2100 | |
61924370 | professorik | E | Oct. 5, 2019, 2:09 p.m. | OK | GNU C++17 | TESTS | 66 | 156 | 6041600 | 2100 | |
43345437 | ludo | E | Sept. 23, 2018, 8:10 p.m. | OK | GNU C++17 | TESTS | 66 | 171 | 1228800 | 2100 | |
44705298 | masha_and_beer | E | Oct. 22, 2018, 4:33 p.m. | OK | GNU C++17 | TESTS | 66 | 171 | 2662400 | 2100 | |
68336640 | DATVN | E | Jan. 6, 2020, 10:38 p.m. | OK | GNU C++17 | TESTS | 66 | 171 | 3584000 | 2100 | |
58129092 | aditya_sheth | E | Aug. 1, 2019, 1:36 p.m. | OK | GNU C++17 | TESTS | 66 | 171 | 3584000 | 2100 | |
64526009 | WangJialei | E | Nov. 8, 2019, 1:49 p.m. | OK | Go | TESTS | 66 | 701 | 23244800 | 2100 | |
64526103 | vjudge2 | E | Nov. 8, 2019, 1:51 p.m. | OK | Go | TESTS | 66 | 717 | 23142400 | 2100 | |
43418802 | AJ47 | E | Sept. 25, 2018, 4:44 p.m. | OK | Java 8 | TESTS | 66 | 389 | 0 | 2100 | |
45511461 | layersOf | E | Nov. 10, 2018, 1:15 p.m. | OK | Java 8 | TESTS | 66 | 451 | 0 | 2100 | |
43373933 | wery0 | E | Sept. 24, 2018, 3:44 p.m. | OK | Java 8 | TESTS | 66 | 576 | 0 | 2100 | |
61081763 | LAKOUAM_IMAD | E | Sept. 22, 2019, 4:39 p.m. | OK | Java 8 | TESTS | 66 | 654 | 29081600 | 2100 | |
50242047 | RDmitriyS | E | Feb. 20, 2019, 1:21 p.m. | OK | Java 8 | TESTS | 66 | 779 | 0 | 2100 | |
57085430 | satya26 | E | July 15, 2019, 8:38 a.m. | OK | Java 8 | TESTS | 66 | 935 | 38707200 | 2100 | |
43385174 | E.Vakhitov | E | Sept. 24, 2018, 7:45 p.m. | OK | Java 8 | TESTS | 66 | 966 | 35635200 | 2100 | |
43347820 | 4mda4mda | E | Sept. 23, 2018, 10:01 p.m. | OK | Java 8 | TESTS | 66 | 1013 | 33280000 | 2100 | |
43981915 | LoneFox | E | Oct. 8, 2018, 3:52 a.m. | OK | MS C++ | TESTS | 66 | 670 | 14540800 | 2100 | |
43784474 | FireBlaze | E | Oct. 4, 2018, 11:44 a.m. | OK | MS C++ | TESTS | 66 | 873 | 7270400 | 2100 | |
52266948 | Salim_Shebli | E | April 3, 2019, 11:43 a.m. | OK | MS C++ | TESTS | 66 | 1123 | 6451200 | 2100 | |
43425752 | ZhukDima | E | Sept. 25, 2018, 8:02 p.m. | OK | PascalABC.NET | TESTS | 66 | 576 | 13414400 | 2100 | |
43478807 | cgfs10000 | E | Sept. 27, 2018, 5:29 a.m. | OK | PyPy 2 | TESTS | 66 | 1543 | 41062400 | 2100 | |
47965220 | saku7 | E | Jan. 5, 2019, 11:46 a.m. | OK | PyPy 3 | TESTS | 66 | 904 | 49254400 | 2100 | |
47965396 | saku7 | E | Jan. 5, 2019, 11:52 a.m. | OK | PyPy 3 | TESTS | 66 | 920 | 49356800 | 2100 | |
46511382 | Skybytskyi.Nikita | E | Dec. 2, 2018, 1:28 p.m. | OK | PyPy 3 | TESTS | 66 | 951 | 54476800 | 2100 | |
47828348 | Savit_Gupta | E | Jan. 2, 2019, 3:34 a.m. | OK | PyPy 3 | TESTS | 66 | 1060 | 49664000 | 2100 | |
43478796 | cgfs10000 | E | Sept. 27, 2018, 5:28 a.m. | OK | PyPy 3 | TESTS | 66 | 1762 | 59904000 | 2100 | |
46857702 | gaoadt | E | Dec. 10, 2018, 3:52 p.m. | OK | PyPy 3 | TESTS | 66 | 1840 | 49254400 | 2100 | |
43348184 | clrcldy | E | Sept. 23, 2018, 10:30 p.m. | OK | Rust | TESTS | 66 | 280 | 22220800 | 2100 | |
43348151 | clrcldy | E | Sept. 23, 2018, 10:28 p.m. | OK | Rust | TESTS | 66 | 296 | 22220800 | 2100 |
Back to search problems