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 |
---|---|---|---|---|---|---|
1903 | Codeforces Round 912 (Div. 2) | FINISHED | False | 8100 | 30461099 | Nov. 30, 2023, 4:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 5799 ) | D1 | Maximum And Queries (easy version) | PROGRAMMING | binary search bitmasks brute force greedy |
B'This is the easy version of the problem. The only difference between the two versions is the constraint on n and q , the memory and time limits. You can make hacks only if all versions of the problem are solved. Theofanis really likes to play with the bits of numbers. He has an array a of size n and an integer k . He can make at most k operations in the array. In each operation, he picks a single element and increases it by 1 . He found the maximum bitwise AND that array a can have after at most k operations. Theofanis has put a lot of work into finding this value and was very happy with his result. Unfortunately, Ada xc5 x9b, being the evil person that he is, decided to bully him by repeatedly changing the value of k . Help Theofanis by calculating the maximum possible bitwise AND for q different values of k . Note that queries are independent. The first line contains two integers n and q ( 1 <= n, q <= 10^5 and n cdot q <= 10^5 ) -- the size of the array and the number of queries. The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= 10^6 ) -- the elements of the array. Next q lines describe the queries. The i -th line contains one integer k_i ( 0 <= k_i <= 10^{18} ) -- the number of operations that can be done in the i -th query. For each query, print one integer -- the maximum bitwise AND that array a can have after at most k_i operations. In the first test case, in the first query, we add 1 in the first and last elements of the array. Thus, the array becomes [2,3,7,6] with bitwise AND equal to 2 . In the second test case, in the first query, we add 1 in the first element, 5 in the second, and 3 in the third and now all the elements are equal to 5 . '... |
Codeforces Round #912 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
235130130 | doublethinker | D1 | Nov. 30, 2023, 6:48 p.m. | OK | C# 10 | TESTS | 66 | 1044 | 9830400 | ||
235146413 | Anastasiya_Andreevna | D1 | Nov. 30, 2023, 9:59 p.m. | OK | C# 10 | TESTS | 68 | 1684 | 68403200 | ||
235145365 | Anastasiya_Andreevna | D1 | Nov. 30, 2023, 9:39 p.m. | OK | C# 10 | TESTS | 68 | 1778 | 82022400 | ||
235155092 | mailinh070205 | D1 | Dec. 1, 2023, 1:34 a.m. | OK | Clang++17 Diagnostics | TESTS | 68 | 1981 | 6246400 | ||
235126493 | Parallel_Retrogression | D1 | Nov. 30, 2023, 6:35 p.m. | OK | GNU C++14 | TESTS | 66 | 124 | 1638400 | ||
235154568 | _acsm_ | D1 | Dec. 1, 2023, 1:22 a.m. | OK | GNU C++14 | TESTS | 68 | 139 | 1638400 | ||
235128218 | Luxinze | D1 | Nov. 30, 2023, 6:41 p.m. | OK | GNU C++14 | TESTS | 66 | 140 | 1638400 | ||
235125056 | reus | D1 | Nov. 30, 2023, 6:29 p.m. | OK | GNU C++14 | TESTS | 66 | 140 | 1638400 | ||
235170823 | dangminhhoangdz | D1 | Dec. 1, 2023, 5:36 a.m. | OK | GNU C++14 | TESTS | 68 | 155 | 819200 | ||
235133969 | Gabz_Gabz | D1 | Nov. 30, 2023, 7:32 p.m. | OK | GNU C++14 | TESTS | 66 | 155 | 1638400 | ||
235128530 | triggered_code | D1 | Nov. 30, 2023, 6:42 p.m. | OK | GNU C++14 | TESTS | 66 | 155 | 1638400 | ||
235121351 | haiduy1711 | D1 | Nov. 30, 2023, 6:15 p.m. | OK | GNU C++14 | TESTS | 66 | 155 | 1638400 | ||
235156236 | khanhkhanh410 | D1 | Dec. 1, 2023, 1:58 a.m. | OK | GNU C++14 | TESTS | 68 | 170 | 6451200 | ||
235155313 | zltzlt | D1 | Dec. 1, 2023, 1:38 a.m. | OK | GNU C++14 | TESTS | 68 | 171 | 1638400 | ||
235162629 | Uno_Master | D1 | Dec. 1, 2023, 3:46 a.m. | OK | GNU C++17 | TESTS | 68 | 78 | 2457600 | ||
235123381 | xd435822082 | D1 | Nov. 30, 2023, 6:23 p.m. | OK | GNU C++17 | TESTS | 66 | 108 | 32051200 | ||
235158377 | Uno_Master | D1 | Dec. 1, 2023, 2:41 a.m. | OK | GNU C++17 | TESTS | 68 | 109 | 1638400 | ||
235127631 | NegarBahram | D1 | Nov. 30, 2023, 6:39 p.m. | OK | GNU C++17 | TESTS | 66 | 109 | 53248000 | ||
235169209 | Muhammedali-B-001-25 | D1 | Dec. 1, 2023, 5:19 a.m. | OK | GNU C++17 | TESTS | 68 | 124 | 921600 | ||
235133731 | 5-3 | D1 | Nov. 30, 2023, 7:31 p.m. | OK | GNU C++17 | TESTS | 66 | 124 | 2662400 | ||
235125246 | unga_bunga_69 | D1 | Nov. 30, 2023, 6:30 p.m. | OK | GNU C++17 | TESTS | 66 | 139 | 1638400 | ||
235129446 | masa.dobric | D1 | Nov. 30, 2023, 6:46 p.m. | OK | GNU C++17 | TESTS | 66 | 139 | 3174400 | ||
235117690 | Danilo21 | D1 | Nov. 30, 2023, 6:02 p.m. | OK | GNU C++17 | TESTS | 66 | 139 | 16179200 | ||
235118669 | venikman1 | D1 | Nov. 30, 2023, 6:05 p.m. | OK | GNU C++17 | TESTS | 66 | 140 | 921600 | ||
235134770 | bestzzz | D1 | Nov. 30, 2023, 7:37 p.m. | OK | GNU C++17 (64) | TESTS | 66 | 46 | 1638400 | ||
235118563 | Nuagen | D1 | Nov. 30, 2023, 6:05 p.m. | OK | GNU C++17 (64) | TESTS | 66 | 61 | 16076800 | ||
235151845 | N_z__ | D1 | Dec. 1, 2023, 12:20 a.m. | OK | GNU C++17 (64) | TESTS | 68 | 62 | 921600 | ||
235164388 | paoxiaomo | D1 | Dec. 1, 2023, 4:13 a.m. | OK | GNU C++17 (64) | TESTS | 68 | 77 | 1638400 | ||
235153147 | enslaved | D1 | Dec. 1, 2023, 12:51 a.m. | OK | GNU C++17 (64) | TESTS | 68 | 77 | 1638400 | ||
235135223 | oogerbooger | D1 | Nov. 30, 2023, 7:40 p.m. | OK | GNU C++17 (64) | TESTS | 66 | 77 | 1638400 | ||
235118456 | trjyyds | D1 | Nov. 30, 2023, 6:05 p.m. | OK | GNU C++17 (64) | TESTS | 66 | 77 | 40038400 | ||
235158160 | fs20091003 | D1 | Dec. 1, 2023, 2:36 a.m. | OK | GNU C++17 (64) | TESTS | 68 | 78 | 1638400 | ||
235119695 | _2__0 | D1 | Nov. 30, 2023, 6:09 p.m. | OK | GNU C++17 (64) | TESTS | 66 | 78 | 1638400 | ||
235136409 | Ferrriccc | D1 | Nov. 30, 2023, 7:50 p.m. | OK | GNU C++17 (64) | TESTS | 66 | 92 | 1638400 | ||
235151684 | cmk666 | D1 | Dec. 1, 2023, 12:16 a.m. | OK | GNU C++20 (64) | TESTS | 68 | 31 | 1331200 | ||
235157915 | lniiwuw_y | D1 | Dec. 1, 2023, 2:32 a.m. | OK | GNU C++20 (64) | TESTS | 68 | 31 | 1638400 | ||
235145165 | abdrahmanabdkareem | D1 | Nov. 30, 2023, 9:35 p.m. | OK | GNU C++20 (64) | TESTS | 68 | 46 | 819200 | ||
235133715 | Beevo | D1 | Nov. 30, 2023, 7:31 p.m. | OK | GNU C++20 (64) | TESTS | 66 | 46 | 1228800 | ||
235127053 | NotBeevo | D1 | Nov. 30, 2023, 6:37 p.m. | OK | GNU C++20 (64) | TESTS | 66 | 46 | 1228800 | ||
235172999 | Der_Vlapos | D1 | Dec. 1, 2023, 5:56 a.m. | OK | GNU C++20 (64) | TESTS | 68 | 46 | 1638400 | ||
235171261 | Pendem | D1 | Dec. 1, 2023, 5:40 a.m. | OK | GNU C++20 (64) | TESTS | 68 | 46 | 1638400 | ||
235163988 | vuavisao | D1 | Dec. 1, 2023, 4:06 a.m. | OK | GNU C++20 (64) | TESTS | 68 | 46 | 1638400 | ||
235155925 | AlMuhitMuhtadi | D1 | Dec. 1, 2023, 1:51 a.m. | OK | GNU C++20 (64) | TESTS | 68 | 46 | 1638400 | ||
235155913 | AlMuhitMuhtadi | D1 | Dec. 1, 2023, 1:50 a.m. | OK | GNU C++20 (64) | TESTS | 68 | 46 | 1638400 | ||
235123956 | WORTH | D1 | Nov. 30, 2023, 6:25 p.m. | OK | Java 11 | TESTS | 66 | 311 | 0 | ||
235114942 | profchi | D1 | Nov. 30, 2023, 5:53 p.m. | OK | Java 11 | TESTS | 66 | 311 | 0 | ||
235118298 | fpeterfalvi | D1 | Nov. 30, 2023, 6:04 p.m. | OK | Java 11 | TESTS | 66 | 326 | 0 | ||
235120451 | furating | D1 | Nov. 30, 2023, 6:12 p.m. | OK | Java 11 | TESTS | 66 | 342 | 0 | ||
235128854 | man-ray | D1 | Nov. 30, 2023, 6:44 p.m. | OK | Java 11 | TESTS | 66 | 358 | 0 | ||
235116003 | etian6795 | D1 | Nov. 30, 2023, 5:56 p.m. | OK | Java 11 | TESTS | 66 | 623 | 53043200 | ||
235141123 | kasiru_69 | D1 | Nov. 30, 2023, 8:38 p.m. | OK | Java 11 | TESTS | 68 | 1138 | 0 | ||
235124678 | ritvik369 | D1 | Nov. 30, 2023, 6:28 p.m. | OK | Java 11 | TESTS | 66 | 1793 | 0 | ||
235125203 | soumit915 | D1 | Nov. 30, 2023, 6:30 p.m. | OK | Java 17 | TESTS | 66 | 249 | 1024000 | ||
235117598 | 28leoleo28 | D1 | Nov. 30, 2023, 6:02 p.m. | OK | Java 17 | TESTS | 66 | 265 | 921600 | ||
235128423 | skylord69 | D1 | Nov. 30, 2023, 6:42 p.m. | OK | Java 17 | TESTS | 66 | 982 | 1024000 | ||
235127515 | Valkyrie.. | D1 | Nov. 30, 2023, 6:39 p.m. | OK | Java 21 | TESTS | 66 | 1778 | 1536000 | ||
235150865 | sary-bala | D1 | Nov. 30, 2023, 11:52 p.m. | OK | Java 8 | TESTS | 68 | 202 | 0 | ||
235163266 | ashish1729 | D1 | Dec. 1, 2023, 3:55 a.m. | OK | Java 8 | TESTS | 68 | 233 | 0 | ||
235126713 | ashish1729 | D1 | Nov. 30, 2023, 6:35 p.m. | OK | Java 8 | TESTS | 66 | 249 | 0 | ||
235128797 | deni1000 | D1 | Nov. 30, 2023, 6:43 p.m. | OK | Java 8 | TESTS | 66 | 327 | 0 | ||
235135027 | 1-1-1 | D1 | Nov. 30, 2023, 7:39 p.m. | OK | Java 8 | TESTS | 66 | 732 | 3686400 | ||
235124801 | real.emerald | D1 | Nov. 30, 2023, 6:28 p.m. | OK | Java 8 | TESTS | 66 | 873 | 1024000 | ||
235128041 | iuxan | D1 | Nov. 30, 2023, 6:41 p.m. | OK | MS C++ 2017 | TESTS | 66 | 561 | 104550400 | ||
235173471 | harshk_52 | D1 | Dec. 1, 2023, 6 a.m. | OK | PyPy 3-64 | TESTS | 68 | 264 | 14336000 | ||
235133785 | _M_H_M_ | D1 | Nov. 30, 2023, 7:31 p.m. | OK | PyPy 3-64 | TESTS | 66 | 311 | 10956800 | ||
235120822 | AadiS | D1 | Nov. 30, 2023, 6:13 p.m. | OK | PyPy 3-64 | TESTS | 66 | 326 | 15257600 | ||
235119411 | zechri | D1 | Nov. 30, 2023, 6:08 p.m. | OK | PyPy 3-64 | TESTS | 66 | 358 | 18022400 | ||
235147976 | the_last_smilodon | D1 | Nov. 30, 2023, 10:35 p.m. | OK | PyPy 3-64 | TESTS | 68 | 420 | 16896000 | ||
235121885 | cybsbbb | D1 | Nov. 30, 2023, 6:17 p.m. | OK | PyPy 3-64 | TESTS | 66 | 483 | 64000000 | ||
235119300 | fruityy | D1 | Nov. 30, 2023, 6:08 p.m. | OK | PyPy 3-64 | TESTS | 66 | 545 | 14233600 | ||
235118255 | iedfa | D1 | Nov. 30, 2023, 6:04 p.m. | OK | PyPy 3-64 | TESTS | 66 | 607 | 15667200 | ||
235126213 | Khaild_Salman | D1 | Nov. 30, 2023, 6:34 p.m. | OK | PyPy 3-64 | TESTS | 66 | 686 | 16588800 | ||
235126437 | khanter_ | D1 | Nov. 30, 2023, 6:34 p.m. | OK | PyPy 3-64 | TESTS | 66 | 717 | 13107200 | ||
235114568 | PugachAG | D1 | Nov. 30, 2023, 5:51 p.m. | OK | Rust 2021 | TESTS | 66 | 46 | 1638400 | ||
235146794 | jyom | D1 | Nov. 30, 2023, 10:09 p.m. | OK | Rust 2021 | TESTS | 68 | 795 | 3174400 | ||
235115676 | romegenix666 | D1 | Nov. 30, 2023, 5:55 p.m. | OK | Rust 2021 | TESTS | 66 | 1200 | 4812800 |
Back to search problems