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 |
---|---|---|---|---|---|---|
1926 | Codeforces Round 928 (Div. 4) | FINISHED | False | 8100 | 28826663 | Feb. 19, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 16121 ) | D | Vlad and Division | PROGRAMMING | bitmasks greedy |
B'Vladislav has n non-negative integers, and he wants to divide all of them into several groups so that in any group, any pair of numbers does not have matching bit values among bits from 1 -st to 31 -st bit (i.e., considering the 31 least significant bits of the binary representation). For an integer k , let k_2(i) denote the i -th bit in its binary representation (from right to left, indexing from 1). For example, if k=43 , since 43=101011_2 , then 43_2(1)=1 , 43_2(2)=1 , 43_2(3)=0 , 43_2(4)=1 , 43_2(5)=0 , 43_2(6)=1 , 43_2(7)=0 , 43_2(8)=0, ... , 43_2(31)=0 . Formally, for any two numbers x and y in the same group, the condition x_2(i) neq y_2(i) must hold for all 1 <= q i < 32 . What is the minimum number of groups Vlad needs to achieve his goal? Each number must fall into exactly one group. The first line contains a single integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= q n <= q 2 cdot 10^5 ) -- the total number of integers. The second line of each test case contains n given integers a_1, ldots, a_n ( 0 <= q a_j < 2^{31} ). The sum of n over all test cases in a test does not exceed 2 cdot 10^5 . For each test case, output a single integer -- the minimum number of groups required to satisfy the condition. In the first test case, any two numbers have the same last 31 bits, so we need to place each number in its own group. In the second test case, a_1=0000000000000000000000000000000_2 , a_2=1111111111111111111111111111111_2 so they can be placed in the same group because a_1(i) ne a_2(i) for each i between 1 and 31 , inclusive. '... |
126132 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
247384333 | stupidnessplusplus | D | Feb. 19, 2024, 6:43 p.m. | OK | C# 10 | TESTS | 10 | 155 | 34304000 | ||
247403929 | Gassa | D | Feb. 19, 2024, 10:46 p.m. | OK | D | TESTS | 21 | 124 | 38195200 | ||
247404173 | Gassa | D | Feb. 19, 2024, 10:51 p.m. | OK | D | TESTS | 21 | 155 | 19148800 | ||
247396071 | JoksimKaktus | D | Feb. 19, 2024, 8:40 p.m. | OK | GNU C11 | TESTS | 21 | 140 | 1024000 | ||
247369220 | ahamshubham | D | Feb. 19, 2024, 5:04 p.m. | OK | GNU C++17 | TESTS | 10 | 61 | 819200 | ||
247373952 | matislu | D | Feb. 19, 2024, 5:28 p.m. | OK | GNU C++17 | TESTS | 10 | 78 | 819200 | ||
247389409 | ScilentAssasin | D | Feb. 19, 2024, 7:30 p.m. | OK | GNU C++17 | TESTS | 10 | 78 | 1638400 | ||
247374880 | kingsneverdie1411 | D | Feb. 19, 2024, 5:34 p.m. | OK | GNU C++17 | TESTS | 10 | 78 | 1638400 | ||
247367862 | Ahmed_Jamal_Sultan | D | Feb. 19, 2024, 4:58 p.m. | OK | GNU C++17 | TESTS | 10 | 78 | 1638400 | ||
247424349 | py666 | D | Feb. 20, 2024, 4:40 a.m. | OK | GNU C++17 | TESTS | 21 | 78 | 1638400 | ||
247369200 | A_Ringer | D | Feb. 19, 2024, 5:04 p.m. | OK | GNU C++17 | TESTS | 10 | 78 | 9625600 | ||
247418335 | -K_I_R_A- | D | Feb. 20, 2024, 3:19 a.m. | OK | GNU C++17 | TESTS | 21 | 92 | 1638400 | ||
247402620 | avoid | D | Feb. 19, 2024, 10:16 p.m. | OK | GNU C++17 | TESTS | 21 | 93 | 819200 | ||
247411412 | Xiaobaibubai | D | Feb. 20, 2024, 1:32 a.m. | OK | GNU C++17 | TESTS | 21 | 93 | 819200 | ||
247378150 | 272222255 | D | Feb. 19, 2024, 5:55 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 46 | 2457600 | ||
247376912 | lO_ol | D | Feb. 19, 2024, 5:47 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 61 | 819200 | ||
247369864 | wandw | D | Feb. 19, 2024, 5:07 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 61 | 1638400 | ||
247373936 | Ldawn_AI | D | Feb. 19, 2024, 5:28 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 62 | 1638400 | ||
247411329 | Duck_sajin | D | Feb. 20, 2024, 1:31 a.m. | OK | GNU C++17 (64) | TESTS | 21 | 62 | 1638400 | ||
247370639 | 272222255 | D | Feb. 19, 2024, 5:10 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 62 | 4812800 | ||
247376721 | lO_ol | D | Feb. 19, 2024, 5:45 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 77 | 819200 | ||
247415472 | Lingmori | D | Feb. 20, 2024, 2:40 a.m. | OK | GNU C++17 (64) | TESTS | 21 | 77 | 1638400 | ||
247412189 | enslaved | D | Feb. 20, 2024, 1:47 a.m. | OK | GNU C++17 (64) | TESTS | 21 | 77 | 1638400 | ||
247405499 | saki_0408 | D | Feb. 19, 2024, 11:26 p.m. | OK | GNU C++17 (64) | TESTS | 21 | 93 | 1638400 | ||
247368980 | Kirigakure_Saizo | D | Feb. 19, 2024, 5:03 p.m. | OK | GNU C++20 (64) | TESTS | 10 | 31 | 4300800 | ||
247428724 | Lurenjia_123 | D | Feb. 20, 2024, 5:32 a.m. | OK | GNU C++20 (64) | TESTS | 21 | 46 | 819200 | ||
247427760 | PCC | D | Feb. 20, 2024, 5:21 a.m. | OK | GNU C++20 (64) | TESTS | 21 | 46 | 819200 | ||
247414921 | ZXPRISM | D | Feb. 20, 2024, 2:31 a.m. | OK | GNU C++20 (64) | TESTS | 21 | 46 | 819200 | ||
247373455 | harsha_.05_ | D | Feb. 19, 2024, 5:25 p.m. | OK | GNU C++20 (64) | TESTS | 10 | 46 | 819200 | ||
247414604 | AseemMeher | D | Feb. 20, 2024, 2:27 a.m. | OK | GNU C++20 (64) | TESTS | 21 | 46 | 1638400 | ||
247398691 | 0.1_Zishan | D | Feb. 19, 2024, 9:14 p.m. | OK | GNU C++20 (64) | TESTS | 21 | 46 | 1638400 | ||
247390382 | AkSingh021 | D | Feb. 19, 2024, 7:40 p.m. | OK | GNU C++20 (64) | TESTS | 10 | 46 | 1638400 | ||
247389760 | Mustafa_Elghisha | D | Feb. 19, 2024, 7:33 p.m. | OK | GNU C++20 (64) | TESTS | 10 | 46 | 1638400 | ||
247428792 | vilgax_5410 | D | Feb. 20, 2024, 5:33 a.m. | OK | GNU C++20 (64) | TESTS | 21 | 46 | 1638400 | ||
247430938 | pookie_ | D | Feb. 20, 2024, 5:56 a.m. | OK | Go | TESTS | 22 | 156 | 4915200 | ||
247430689 | pookie_ | D | Feb. 20, 2024, 5:54 a.m. | OK | Go | TESTS | 22 | 499 | 154316800 | ||
247372751 | madhu_16 | D | Feb. 19, 2024, 5:21 p.m. | OK | Java 21 | TESTS | 10 | 373 | 6348800 | ||
247371000 | rishit164 | D | Feb. 19, 2024, 5:12 p.m. | OK | Java 21 | TESTS | 10 | 374 | 4505600 | ||
247380446 | _CHEEMS_ | D | Feb. 19, 2024, 6:11 p.m. | OK | Java 21 | TESTS | 10 | 374 | 4608000 | ||
247389586 | vikasseervi357 | D | Feb. 19, 2024, 7:32 p.m. | OK | Java 21 | TESTS | 10 | 374 | 5324800 | ||
247384571 | dzhi | D | Feb. 19, 2024, 6:45 p.m. | OK | Java 21 | TESTS | 10 | 389 | 11776000 | ||
247368759 | santuan | D | Feb. 19, 2024, 5:02 p.m. | OK | Java 21 | TESTS | 10 | 405 | 5427200 | ||
247430687 | AKhacks | D | Feb. 20, 2024, 5:54 a.m. | OK | Java 21 | TESTS | 22 | 436 | 13516800 | ||
247390539 | jayantKS29 | D | Feb. 19, 2024, 7:41 p.m. | OK | Java 21 | TESTS | 10 | 436 | 14028800 | ||
247416559 | rrb_07 | D | Feb. 20, 2024, 2:55 a.m. | OK | Java 21 | TESTS | 21 | 436 | 15872000 | ||
247422975 | amit_roy | D | Feb. 20, 2024, 4:21 a.m. | OK | Java 21 | TESTS | 21 | 452 | 16281600 | ||
247382661 | gdax | D | Feb. 19, 2024, 6:29 p.m. | OK | Java 8 | TESTS | 10 | 202 | 12902400 | ||
247378133 | YarosHarm | D | Feb. 19, 2024, 5:55 p.m. | OK | Java 8 | TESTS | 10 | 249 | 9625600 | ||
247417712 | yvbf | D | Feb. 20, 2024, 3:11 a.m. | OK | Java 8 | TESTS | 21 | 265 | 9625600 | ||
247410402 | Xing_ke | D | Feb. 20, 2024, 1:13 a.m. | OK | Java 8 | TESTS | 21 | 296 | 14438400 | ||
247418305 | lovejsn | D | Feb. 20, 2024, 3:18 a.m. | OK | Java 8 | TESTS | 21 | 311 | 15462400 | ||
247407241 | Safawt | D | Feb. 20, 2024, 12:09 a.m. | OK | Java 8 | TESTS | 21 | 342 | 15667200 | ||
247422742 | NerfThis | D | Feb. 20, 2024, 4:17 a.m. | OK | Java 8 | TESTS | 21 | 530 | 56524800 | ||
247374141 | Abhinav_16 | D | Feb. 19, 2024, 5:29 p.m. | OK | Java 8 | TESTS | 10 | 546 | 0 | ||
247414513 | duyipeng | D | Feb. 20, 2024, 2:25 a.m. | OK | Java 8 | TESTS | 21 | 546 | 50073600 | ||
247379205 | HARRY_HARRY | D | Feb. 19, 2024, 6:02 p.m. | OK | Java 8 | TESTS | 10 | 561 | 3584000 | ||
247419502 | linxiaotian | D | Feb. 20, 2024, 3:33 a.m. | OK | Kotlin 1.9 | TESTS | 21 | 1730 | 127385600 | ||
247371811 | SeryVolk | D | Feb. 19, 2024, 5:16 p.m. | OK | MS C++ 2017 | TESTS | 10 | 171 | 6553600 | ||
247378876 | qmk | D | Feb. 19, 2024, 6 p.m. | OK | MS C++ 2017 | TESTS | 10 | 280 | 6963200 | ||
247376506 | alle_bpy | D | Feb. 19, 2024, 5:44 p.m. | OK | MS C++ 2017 | TESTS | 10 | 296 | 5427200 | ||
247385456 | twispifoxy | D | Feb. 19, 2024, 6:52 p.m. | OK | MS C++ 2017 | TESTS | 10 | 296 | 6553600 | ||
247392064 | Prashant_Tripathi | D | Feb. 19, 2024, 7:57 p.m. | OK | MS C++ 2017 | TESTS | 10 | 327 | 6963200 | ||
247419144 | Saruulbuyan0624 | D | Feb. 20, 2024, 3:28 a.m. | OK | MS C++ 2017 | TESTS | 21 | 374 | 36966400 | ||
247418842 | aluckyboy | D | Feb. 20, 2024, 3:25 a.m. | OK | MS C++ 2017 | TESTS | 21 | 405 | 17715200 | ||
247375077 | ahethesham8 | D | Feb. 19, 2024, 5:35 p.m. | OK | MS C++ 2017 | TESTS | 10 | 576 | 121856000 | ||
247425879 | luoingly | D | Feb. 20, 2024, 5 a.m. | OK | PHP | TESTS | 21 | 124 | 31539200 | ||
247370100 | OLOGY | D | Feb. 19, 2024, 5:08 p.m. | OK | PyPy 2 | TESTS | 10 | 296 | 38604800 | ||
247374545 | _oO_Oo_ | D | Feb. 19, 2024, 5:31 p.m. | OK | PyPy 3 | TESTS | 10 | 561 | 17817600 | ||
247387362 | ansun.sim | D | Feb. 19, 2024, 7:10 p.m. | OK | PyPy 3 | TESTS | 10 | 577 | 41472000 | ||
247399847 | cybsbbb | D | Feb. 19, 2024, 9:30 p.m. | OK | PyPy 3 | TESTS | 21 | 1637 | 43315200 | ||
247399777 | cybsbbb | D | Feb. 19, 2024, 9:28 p.m. | OK | PyPy 3 | TESTS | 21 | 1715 | 43417600 | ||
247399825 | cybsbbb | D | Feb. 19, 2024, 9:29 p.m. | OK | PyPy 3 | TESTS | 21 | 1730 | 43212800 | ||
247399673 | cybsbbb | D | Feb. 19, 2024, 9:27 p.m. | OK | PyPy 3 | TESTS | 21 | 1965 | 43417600 | ||
247380402 | strashila | D | Feb. 19, 2024, 6:11 p.m. | OK | PyPy 3-64 | TESTS | 10 | 140 | 27033600 | ||
247370941 | helltractor | D | Feb. 19, 2024, 5:12 p.m. | OK | PyPy 3-64 | TESTS | 10 | 171 | 31334400 | ||
247412220 | yefei162 | D | Feb. 20, 2024, 1:47 a.m. | OK | PyPy 3-64 | TESTS | 21 | 186 | 34816000 | ||
247388007 | amongsus | D | Feb. 19, 2024, 7:17 p.m. | OK | PyPy 3-64 | TESTS | 10 | 186 | 38092800 | ||
247420261 | Admiring_ShockleyZns | D | Feb. 20, 2024, 3:43 a.m. | OK | PyPy 3-64 | TESTS | 21 | 187 | 33382400 | ||
247396790 | gardengnome | D | Feb. 19, 2024, 8:49 p.m. | OK | PyPy 3-64 | TESTS | 21 | 187 | 34099200 | ||
247396439 | gardengnome | D | Feb. 19, 2024, 8:45 p.m. | OK | PyPy 3-64 | TESTS | 21 | 187 | 34099200 | ||
247371769 | wyjsdpku | D | Feb. 19, 2024, 5:16 p.m. | OK | PyPy 3-64 | TESTS | 10 | 202 | 30515200 | ||
247379149 | chestnut890123 | D | Feb. 19, 2024, 6:02 p.m. | OK | PyPy 3-64 | TESTS | 10 | 202 | 30822400 | ||
247404819 | GodZhere | D | Feb. 19, 2024, 11:07 p.m. | OK | PyPy 3-64 | TESTS | 21 | 202 | 32460800 | ||
247370371 | OLOGY | D | Feb. 19, 2024, 5:09 p.m. | OK | Python 2 | TESTS | 10 | 217 | 13107200 | ||
247391895 | el3ctr0-8yt3 | D | Feb. 19, 2024, 7:55 p.m. | OK | Python 3 | TESTS | 10 | 187 | 28672000 | ||
247369979 | _twi_nami | D | Feb. 19, 2024, 5:07 p.m. | OK | Python 3 | TESTS | 10 | 202 | 26316800 | ||
247372791 | ash2298744 | D | Feb. 19, 2024, 5:21 p.m. | OK | Python 3 | TESTS | 10 | 202 | 26828800 | ||
247369230 | ChunkyPiggy | D | Feb. 19, 2024, 5:04 p.m. | OK | Python 3 | TESTS | 10 | 202 | 28876800 | ||
247369224 | _twi_nami | D | Feb. 19, 2024, 5:04 p.m. | OK | Python 3 | TESTS | 10 | 217 | 27238400 | ||
247376587 | vj1 | D | Feb. 19, 2024, 5:44 p.m. | OK | Python 3 | TESTS | 10 | 217 | 28672000 | ||
247378468 | AResh | D | Feb. 19, 2024, 5:57 p.m. | OK | Python 3 | TESTS | 10 | 217 | 30822400 | ||
247386333 | H1743322 | D | Feb. 19, 2024, 7 p.m. | OK | Python 3 | TESTS | 10 | 218 | 29491200 | ||
247369190 | TrivialZzy | D | Feb. 19, 2024, 5:04 p.m. | OK | Python 3 | TESTS | 10 | 218 | 29491200 | ||
247368148 | krism | D | Feb. 19, 2024, 4:59 p.m. | OK | Python 3 | TESTS | 10 | 218 | 29491200 | ||
247380156 | 0x81 | D | Feb. 19, 2024, 6:09 p.m. | OK | Ruby 3 | TESTS | 10 | 858 | 52019200 | ||
247369151 | vstiff | D | Feb. 19, 2024, 5:04 p.m. | OK | Rust 2021 | TESTS | 10 | 46 | 6860800 | ||
247398964 | Hyrulia | D | Feb. 19, 2024, 9:17 p.m. | OK | Rust 2021 | TESTS | 21 | 46 | 8908800 | ||
247380936 | snamy520 | D | Feb. 19, 2024, 6:15 p.m. | OK | Rust 2021 | TESTS | 10 | 140 | 18841600 |
Back to search problems