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 |
---|---|---|---|---|---|---|
1847 | Codeforces Round 882 (Div. 2) | FINISHED | False | 8100 | 48525863 | July 6, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 20429 ) | B | Hamon Odyssey | PROGRAMMING | bitmasks greedy implementation |
B"Jonathan is fighting against DIO's Vampire minions. There are n of them with strengths a_1, a_2, ... , a_n . def and {{ , texttt{&} ,}} Denote (l, r) as the group consisting of the vampires with indices from l to r . Jonathan realizes that the strength of any such group is in its weakest link, that is, the bitwise AND. More formally, the strength level of the group (l, r) is defined as f(l,r) = a_l and a_{l+1} and a_{l+2} and ldots and a_r. Here, and denotes the bitwise AND operation. Because Jonathan would like to defeat the vampire minions fast, he will divide the vampires into contiguous groups, such that each vampire is in exactly one group, and the sum of strengths of the groups is minimized. Among all ways to divide the vampires, he would like to find the way with the maximum number of groups. Given the strengths of each of the n vampires, find the maximum number of groups among all possible ways to divide the vampires with the smallest sum of strengths. The first line contains a single integer t (1 <= q t <= q 10^4) -- the number of test cases. The description of test cases follows. The first line of each test case contains a single integer n ( 1 <= q n <= q 2 cdot 10^5 ) -- the number of vampires. The second line of each test case contains n integers a_1,a_2, ldots,a_n ( 0 <= q a_i <= q 10^9 ) -- the individual strength of each vampire. The sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output a single integer -- the maximum number of groups among all possible ways to divide the vampires with the smallest sum of strengths. In the first test case, the optimal way is to take all the n vampires as a group. So, f(1,3) = 1 and 2 and 3 = 0 . In the second test case, the optimal way is to make 2 groups, (2,3,1) and (5,2) . So, f(1,3) + f(4,5) = (2 and 3 and 1) "... |
Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
212484545 | bluemegane | B | July 7, 2023, 12:23 a.m. | OK | C# 8 | TESTS | 19 | 155 | 16384000 | ||
212484042 | bluemegane | B | July 7, 2023, 12:11 a.m. | OK | C# 8 | TESTS | 19 | 155 | 16384000 | ||
212485670 | lkjhqwerasd | B | July 7, 2023, 12:47 a.m. | OK | Clang++20 Diagnostics | TESTS | 19 | 202 | 72908800 | ||
212465882 | zagvozdkin | B | July 6, 2023, 7:20 p.m. | OK | Clang++20 Diagnostics | TESTS | 19 | 966 | 18944000 | ||
212457374 | iffatul_anon | B | July 6, 2023, 6:17 p.m. | OK | GNU C11 | TESTS | 19 | 78 | 1638400 | ||
212478605 | prattay56 | B | July 6, 2023, 10:17 p.m. | OK | GNU C11 | TESTS | 19 | 78 | 1638400 | ||
212443674 | maruf_bro | B | July 6, 2023, 4:36 p.m. | OK | GNU C11 | TESTS | 19 | 93 | 819200 | ||
212458293 | PROhan | B | July 6, 2023, 6:24 p.m. | OK | GNU C11 | TESTS | 19 | 93 | 819200 | ||
212459431 | UsingJester | B | July 6, 2023, 6:33 p.m. | OK | GNU C11 | TESTS | 19 | 93 | 1638400 | ||
212481903 | Unari | B | July 6, 2023, 11:24 p.m. | OK | GNU C++14 | TESTS | 19 | 31 | 3993600 | ||
212489493 | shy_orz | B | July 7, 2023, 1:54 a.m. | OK | GNU C++14 | TESTS | 19 | 46 | 819200 | ||
212442623 | wswwtx | B | July 6, 2023, 4:33 p.m. | OK | GNU C++14 | TESTS | 19 | 61 | 819200 | ||
212446271 | Ibne_Hassan | B | July 6, 2023, 4:43 p.m. | OK | GNU C++14 | TESTS | 19 | 61 | 819200 | ||
212446425 | ifteher_uddin48 | B | July 6, 2023, 4:43 p.m. | OK | GNU C++14 | TESTS | 19 | 61 | 819200 | ||
212458938 | qqqqqrz | B | July 6, 2023, 6:29 p.m. | OK | GNU C++14 | TESTS | 19 | 61 | 819200 | ||
212497970 | TEoS | B | July 7, 2023, 3:39 a.m. | OK | GNU C++14 | TESTS | 19 | 61 | 819200 | ||
212508255 | ZZL0136 | B | July 7, 2023, 5:54 a.m. | OK | GNU C++14 | TESTS | 19 | 61 | 819200 | ||
212473650 | Esmael_Samir | B | July 6, 2023, 8:54 p.m. | OK | GNU C++14 | TESTS | 19 | 62 | 0 | ||
212495845 | stdadmin | B | July 7, 2023, 3:13 a.m. | OK | GNU C++14 | TESTS | 19 | 62 | 0 | ||
212495413 | dasr63328 | B | July 7, 2023, 3:08 a.m. | OK | GNU C++17 | TESTS | 19 | 61 | 819200 | ||
212442089 | Imenkey | B | July 6, 2023, 4:32 p.m. | OK | GNU C++17 | TESTS | 19 | 61 | 819200 | ||
212458859 | realshady105 | B | July 6, 2023, 6:28 p.m. | OK | GNU C++17 | TESTS | 19 | 61 | 819200 | ||
212506825 | Erythrocyte | B | July 7, 2023, 5:38 a.m. | OK | GNU C++17 | TESTS | 19 | 61 | 1638400 | ||
212454293 | ZyadFva | B | July 6, 2023, 5:59 p.m. | OK | GNU C++17 | TESTS | 19 | 61 | 1638400 | ||
212445382 | Amolieax | B | July 6, 2023, 4:41 p.m. | OK | GNU C++17 | TESTS | 19 | 61 | 1638400 | ||
212487058 | Moonshine_sake | B | July 7, 2023, 1:14 a.m. | OK | GNU C++17 | TESTS | 19 | 61 | 3174400 | ||
212498806 | anikethend1234 | B | July 7, 2023, 3:49 a.m. | OK | GNU C++17 | TESTS | 19 | 62 | 0 | ||
212498980 | anikethend1234 | B | July 7, 2023, 3:51 a.m. | OK | GNU C++17 | TESTS | 19 | 62 | 0 | ||
212505474 | dimastrakhal | B | July 7, 2023, 5:21 a.m. | OK | GNU C++17 | TESTS | 19 | 62 | 0 | ||
212454988 | kartikstark1601 | B | July 6, 2023, 6:02 p.m. | OK | GNU C++17 (64) | TESTS | 19 | 46 | 0 | ||
212501912 | islam_rokon_e | B | July 7, 2023, 4:31 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 46 | 0 | ||
212499013 | ImmortalMerlin | B | July 7, 2023, 3:52 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 46 | 0 | ||
212503312 | Tanphoon | B | July 7, 2023, 4:51 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 46 | 819200 | ||
212507821 | nipungoyal03 | B | July 7, 2023, 5:49 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 46 | 819200 | ||
212503510 | yzzhh | B | July 7, 2023, 4:54 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 46 | 819200 | ||
212503229 | LXH-cat | B | July 7, 2023, 4:50 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 46 | 819200 | ||
212500971 | anant83 | B | July 7, 2023, 4:18 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 46 | 819200 | ||
212499795 | Tanphoon | B | July 7, 2023, 4:01 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 46 | 819200 | ||
212496632 | notCF_c0der | B | July 7, 2023, 3:22 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 46 | 819200 | ||
212482519 | jianglyfansfans | B | July 6, 2023, 11:38 p.m. | OK | GNU C++20 (64) | TESTS | 19 | 31 | 0 | ||
212480933 | _SADIEM_ | B | July 6, 2023, 11:03 p.m. | OK | GNU C++20 (64) | TESTS | 19 | 31 | 0 | ||
212475826 | ShenodaAdel | B | July 6, 2023, 9:27 p.m. | OK | GNU C++20 (64) | TESTS | 19 | 31 | 0 | ||
212465526 | Mikami | B | July 6, 2023, 7:16 p.m. | OK | GNU C++20 (64) | TESTS | 19 | 31 | 0 | ||
212459355 | jagjeet | B | July 6, 2023, 6:32 p.m. | OK | GNU C++20 (64) | TESTS | 19 | 31 | 0 | ||
212488956 | BingBing_CN | B | July 7, 2023, 1:45 a.m. | OK | GNU C++20 (64) | TESTS | 19 | 31 | 0 | ||
212489022 | BingBing_CN | B | July 7, 2023, 1:46 a.m. | OK | GNU C++20 (64) | TESTS | 19 | 31 | 0 | ||
212494409 | _subha_ | B | July 7, 2023, 2:57 a.m. | OK | GNU C++20 (64) | TESTS | 19 | 31 | 0 | ||
212504042 | IGeomov | B | July 7, 2023, 5:01 a.m. | OK | GNU C++20 (64) | TESTS | 19 | 31 | 0 | ||
212506864 | satabond | B | July 7, 2023, 5:38 a.m. | OK | GNU C++20 (64) | TESTS | 19 | 31 | 0 | ||
212466670 | dannyshing | B | July 6, 2023, 7:29 p.m. | OK | Java 11 | TESTS | 19 | 171 | 0 | ||
212507898 | vishal_sahu | B | July 7, 2023, 5:50 a.m. | OK | Java 11 | TESTS | 19 | 218 | 0 | ||
212479939 | ShresCodes | B | July 6, 2023, 10:42 p.m. | OK | Java 11 | TESTS | 19 | 218 | 0 | ||
212454015 | samitdas03 | B | July 6, 2023, 5:57 p.m. | OK | Java 11 | TESTS | 19 | 218 | 0 | ||
212486817 | DOOMJUICE | B | July 7, 2023, 1:10 a.m. | OK | Java 11 | TESTS | 19 | 233 | 0 | ||
212445180 | Dake04 | B | July 6, 2023, 4:40 p.m. | OK | Java 11 | TESTS | 19 | 233 | 0 | ||
212443006 | Yousef_Badr | B | July 6, 2023, 4:34 p.m. | OK | Java 11 | TESTS | 19 | 233 | 0 | ||
212443878 | tanukool | B | July 6, 2023, 4:36 p.m. | OK | Java 11 | TESTS | 19 | 249 | 0 | ||
212469588 | samiulhaque | B | July 6, 2023, 8:01 p.m. | OK | Java 11 | TESTS | 19 | 514 | 0 | ||
212502952 | black_devil_9552 | B | July 7, 2023, 4:46 a.m. | OK | Java 11 | TESTS | 19 | 530 | 0 | ||
212472901 | Vrutik_2809 | B | July 6, 2023, 8:44 p.m. | OK | Java 17 | TESTS | 19 | 217 | 409600 | ||
212452758 | Vrutik_2002 | B | July 6, 2023, 5:52 p.m. | OK | Java 17 | TESTS | 19 | 217 | 409600 | ||
212508604 | rbaliwal00 | B | July 7, 2023, 5:57 a.m. | OK | Java 17 | TESTS | 19 | 249 | 716800 | ||
212479198 | wizardleen | B | July 6, 2023, 10:28 p.m. | OK | Java 17 | TESTS | 19 | 249 | 15667200 | ||
212465845 | imvivekthakur | B | July 6, 2023, 7:20 p.m. | OK | Java 17 | TESTS | 19 | 264 | 512000 | ||
212449031 | Legend... | B | July 6, 2023, 4:49 p.m. | OK | Java 17 | TESTS | 19 | 264 | 42291200 | ||
212443921 | ADust | B | July 6, 2023, 4:36 p.m. | OK | Java 17 | TESTS | 19 | 265 | 512000 | ||
212488651 | Abdelrahman.M.3 | B | July 7, 2023, 1:40 a.m. | OK | Java 17 | TESTS | 19 | 265 | 5120000 | ||
212469472 | romanrich89 | B | July 6, 2023, 7:59 p.m. | OK | Java 17 | TESTS | 19 | 280 | 21708800 | ||
212502591 | Nagendravarma | B | July 7, 2023, 4:40 a.m. | OK | Java 17 | TESTS | 19 | 296 | 614400 | ||
212498703 | fawhgfiuagwf | B | July 7, 2023, 3:47 a.m. | OK | Java 8 | TESTS | 19 | 140 | 0 | ||
212486245 | nice333 | B | July 7, 2023, 12:58 a.m. | OK | Java 8 | TESTS | 19 | 140 | 2969600 | ||
212467279 | NerfThis | B | July 6, 2023, 7:35 p.m. | OK | Java 8 | TESTS | 19 | 155 | 2764800 | ||
212472121 | molecule03 | B | July 6, 2023, 8:34 p.m. | OK | Java 8 | TESTS | 19 | 155 | 65843200 | ||
212454829 | raj_shahh | B | July 6, 2023, 6:01 p.m. | OK | Java 8 | TESTS | 19 | 155 | 65843200 | ||
212498178 | thesuperRL | B | July 7, 2023, 3:41 a.m. | OK | Java 8 | TESTS | 19 | 202 | 2764800 | ||
212494827 | Sumitsingh7 | B | July 7, 2023, 3:02 a.m. | OK | Java 8 | TESTS | 19 | 233 | 17100800 | ||
212494830 | priyaroy3370 | B | July 7, 2023, 3:02 a.m. | OK | Java 8 | TESTS | 19 | 327 | 104960000 | ||
212506421 | Juhaied_nabid | B | July 7, 2023, 5:33 a.m. | OK | Java 8 | TESTS | 19 | 405 | 0 | ||
212497854 | dineshsharmanit7 | B | July 7, 2023, 3:37 a.m. | OK | Java 8 | TESTS | 19 | 420 | 0 | ||
212454097 | omkumar70152 | B | July 6, 2023, 5:58 p.m. | OK | MS C++ 2017 | TESTS | 19 | 62 | 1638400 | ||
212505971 | time_x | B | July 7, 2023, 5:27 a.m. | OK | MS C++ 2017 | TESTS | 19 | 108 | 819200 | ||
212474509 | ch21btech11036 | B | July 6, 2023, 9:06 p.m. | OK | MS C++ 2017 | TESTS | 19 | 187 | 1638400 | ||
212444963 | ArTEM13 | B | July 6, 2023, 4:39 p.m. | OK | MS C++ 2017 | TESTS | 19 | 202 | 2252800 | ||
212488476 | lirejie | B | July 7, 2023, 1:37 a.m. | OK | MS C++ 2017 | TESTS | 19 | 217 | 2048000 | ||
212501143 | MAI007 | B | July 7, 2023, 4:21 a.m. | OK | MS C++ 2017 | TESTS | 19 | 218 | 0 | ||
212503529 | Ravitosh | B | July 7, 2023, 4:54 a.m. | OK | MS C++ 2017 | TESTS | 19 | 218 | 819200 | ||
212494396 | suisdavid | B | July 7, 2023, 2:57 a.m. | OK | MS C++ 2017 | TESTS | 19 | 218 | 819200 | ||
212443975 | 7Shobhit7 | B | July 6, 2023, 4:37 p.m. | OK | MS C++ 2017 | TESTS | 19 | 218 | 819200 | ||
212494444 | WeCun | B | July 7, 2023, 2:57 a.m. | OK | MS C++ 2017 | TESTS | 19 | 233 | 819200 | ||
212443655 | 0xROoT | B | July 6, 2023, 4:36 p.m. | OK | PyPy 3 | TESTS | 19 | 202 | 16793600 | ||
212454843 | thuonguyenvan | B | July 6, 2023, 6:01 p.m. | OK | PyPy 3 | TESTS | 19 | 295 | 17408000 | ||
212457045 | Yash_Nandwana | B | July 6, 2023, 6:15 p.m. | OK | PyPy 3 | TESTS | 19 | 374 | 25600000 | ||
212448610 | Mahdieh_Naderi | B | July 6, 2023, 4:49 p.m. | OK | PyPy 3 | TESTS | 19 | 467 | 19046400 | ||
212474079 | Signior | B | July 6, 2023, 9 p.m. | OK | PyPy 3 | TESTS | 19 | 483 | 16179200 | ||
212503786 | jvatsal0709 | B | July 7, 2023, 4:57 a.m. | OK | PyPy 3 | TESTS | 19 | 483 | 19046400 | ||
212461088 | Shourjya19 | B | July 6, 2023, 6:48 p.m. | OK | PyPy 3 | TESTS | 19 | 514 | 19148800 | ||
212477671 | l0stempl3 | B | July 6, 2023, 10 p.m. | OK | PyPy 3-64 | TESTS | 19 | 93 | 21094400 | ||
212477496 | l0stempl3 | B | July 6, 2023, 9:57 p.m. | OK | PyPy 3-64 | TESTS | 19 | 93 | 30208000 | ||
212478054 | codicon | B | July 6, 2023, 10:07 p.m. | OK | PyPy 3-64 | TESTS | 19 | 108 | 27136000 | ||
212458560 | oneku16 | B | July 6, 2023, 6:26 p.m. | OK | PyPy 3-64 | TESTS | 19 | 109 | 19660800 | ||
212474312 | momochi003 | B | July 6, 2023, 9:03 p.m. | OK | PyPy 3-64 | TESTS | 19 | 124 | 26726400 | ||
212485934 | jimini23kjm | B | July 7, 2023, 12:53 a.m. | OK | PyPy 3-64 | TESTS | 19 | 124 | 27545600 | ||
212456911 | cybsbbb | B | July 6, 2023, 6:14 p.m. | OK | PyPy 3-64 | TESTS | 19 | 124 | 27648000 | ||
212492882 | udayan8 | B | July 7, 2023, 2:38 a.m. | OK | PyPy 3-64 | TESTS | 19 | 124 | 28569600 | ||
212502756 | Mustela_Erminea | B | July 7, 2023, 4:43 a.m. | OK | PyPy 3-64 | TESTS | 19 | 124 | 30105600 | ||
212454715 | tnv2004 | B | July 6, 2023, 6:01 p.m. | OK | PyPy 3-64 | TESTS | 19 | 124 | 30105600 | ||
212486110 | eugalt | B | July 7, 2023, 12:56 a.m. | OK | Python 3 | TESTS | 19 | 124 | 20992000 | ||
212493256 | momenelmesady4803 | B | July 7, 2023, 2:43 a.m. | OK | Python 3 | TESTS | 19 | 124 | 28672000 | ||
212485592 | momenashraf482003 | B | July 7, 2023, 12:45 a.m. | OK | Python 3 | TESTS | 19 | 124 | 28672000 | ||
212478585 | Cp_dead | B | July 6, 2023, 10:17 p.m. | OK | Python 3 | TESTS | 19 | 139 | 26316800 | ||
212488736 | eugalt | B | July 7, 2023, 1:42 a.m. | OK | Python 3 | TESTS | 19 | 140 | 20992000 | ||
212486450 | eugalt | B | July 7, 2023, 1:02 a.m. | OK | Python 3 | TESTS | 19 | 140 | 20992000 | ||
212473847 | vadim.golubtsov | B | July 6, 2023, 8:57 p.m. | OK | Python 3 | TESTS | 19 | 140 | 28672000 | ||
212501962 | ProCoder12 | B | July 7, 2023, 4:32 a.m. | OK | Python 3 | TESTS | 19 | 155 | 26214400 | ||
212505780 | NoLongerHuman | B | July 7, 2023, 5:25 a.m. | OK | Python 3 | TESTS | 19 | 155 | 28672000 | ||
212442080 | ObnoxiousCrown | B | July 6, 2023, 4:32 p.m. | OK | Python 3 | TESTS | 19 | 170 | 28262400 |
Back to search problems