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 |
---|---|---|---|---|---|---|
1763 | Codeforces Round 840 (Div. 2) and Enigma 2022 - Cybros LNMIIT | FINISHED | False | 7200 | 60362699 | Dec. 19, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 15760 ) | A | Absolute Maximization | PROGRAMMING | bitmasks constructive algorithms greedy math |
B"You are given an array a of length n . You can perform the following operation several (possibly, zero) times: Find the maximum possible value of max(a) - min(a) . In a binary representation, bits are numbered from right (least significant) to left (most significant). Consider that there are an infinite number of leading zero bits at the beginning of any binary representation. For example, swap the 0 -th bit for 4=100_2 and 3=11_2 will result 101_2=5 and 10_2=2 . Swap the 2 -nd bit for 4=100_2 and 3=11_2 will result 000_2=0_2=0 and 111_2=7 . Here, max(a) denotes the maximum element of array a and min(a) denotes the minimum element of array a . The binary representation of x is x written in base 2 . For example, 9 and 6 written in base 2 are 1001 and 110 , respectively. The first line contains a single integer t ( 1 <= t <= 128 ) -- the number of testcases. The first line of each test case contains a single integer n ( 3 <= n <= 512 ) -- the length of array a . The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i < 1024 ) -- the elements of array a . It's guaranteed that the sum of n over all testcases does not exceed 512 . For each testcase, print one integer -- the maximum possible value of max(a) - min(a) . In the first example, it can be shown that we do not need to perform any operations -- the maximum value of max(a) - min(a) is 1 - 0 = 1 . In the second example, no operation can change the array -- the maximum value of max(a) - min(a) is 5 - 5 = 0 . In the third example, initially a = [1, 2, 3, 4, 5] , we can perform one operation taking i = 2 , j = 5 , b = 1 . The array now becomes a = [1, 0, 3, 4, 7] . It can be shown that any further operations do"... |
Codeforces Round #840 (Div. 2) and Enigma 2022 — Cybros LNMIIT Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
186064594 | tdawawd | A | Dec. 20, 2022, 5:39 a.m. | OK | Clang++17 Diagnostics | TESTS | 10 | 31 | 0 | ||
186003566 | avnim | A | Dec. 19, 2022, 4:13 p.m. | OK | GNU C11 | TESTS | 10 | 15 | 0 | ||
186011611 | PolymathFaisal | A | Dec. 19, 2022, 4:33 p.m. | OK | GNU C11 | TESTS | 10 | 15 | 0 | ||
186017966 | Pratyush21 | A | Dec. 19, 2022, 5:14 p.m. | OK | GNU C11 | TESTS | 10 | 15 | 102400 | ||
186061080 | ckk142 | A | Dec. 20, 2022, 4:46 a.m. | OK | GNU C++14 | TESTS | 10 | 0 | 0 | ||
186060387 | yinjue | A | Dec. 20, 2022, 4:33 a.m. | OK | GNU C++14 | TESTS | 10 | 0 | 0 | ||
186060301 | Abhishek__2021 | A | Dec. 20, 2022, 4:32 a.m. | OK | GNU C++14 | TESTS | 10 | 0 | 0 | ||
186058964 | thanmai15 | A | Dec. 20, 2022, 4:09 a.m. | OK | GNU C++14 | TESTS | 10 | 0 | 0 | ||
186063336 | hmt_13 | A | Dec. 20, 2022, 5:20 a.m. | OK | GNU C++14 | TESTS | 10 | 0 | 0 | ||
186062739 | jatinxkirito | A | Dec. 20, 2022, 5:11 a.m. | OK | GNU C++14 | TESTS | 10 | 0 | 0 | ||
186062583 | wangzirui123 | A | Dec. 20, 2022, 5:09 a.m. | OK | GNU C++14 | TESTS | 10 | 0 | 0 | ||
186062247 | kailashjha018 | A | Dec. 20, 2022, 5:04 a.m. | OK | GNU C++14 | TESTS | 10 | 0 | 0 | ||
186065059 | njustbacon | A | Dec. 20, 2022, 5:45 a.m. | OK | GNU C++14 | TESTS | 10 | 0 | 0 | ||
186064116 | akshit5638 | A | Dec. 20, 2022, 5:32 a.m. | OK | GNU C++14 | TESTS | 10 | 0 | 0 | ||
186061953 | Sanath_Kulla | A | Dec. 20, 2022, 4:59 a.m. | OK | GNU C++17 | TESTS | 10 | 0 | 0 | ||
186061776 | parag776 | A | Dec. 20, 2022, 4:57 a.m. | OK | GNU C++17 | TESTS | 10 | 0 | 0 | ||
186061586 | rishit_30g | A | Dec. 20, 2022, 4:54 a.m. | OK | GNU C++17 | TESTS | 10 | 0 | 0 | ||
186061179 | sujal_sahu25 | A | Dec. 20, 2022, 4:47 a.m. | OK | GNU C++17 | TESTS | 10 | 0 | 0 | ||
186060604 | kushagrarode27 | A | Dec. 20, 2022, 4:37 a.m. | OK | GNU C++17 | TESTS | 10 | 0 | 0 | ||
186060183 | hritvik_k | A | Dec. 20, 2022, 4:30 a.m. | OK | GNU C++17 | TESTS | 10 | 0 | 0 | ||
186059933 | justrookie | A | Dec. 20, 2022, 4:26 a.m. | OK | GNU C++17 | TESTS | 10 | 0 | 0 | ||
186066179 | avcf | A | Dec. 20, 2022, 6:01 a.m. | OK | GNU C++17 | TESTS | 10 | 0 | 0 | ||
186065801 | Ajay_Pal | A | Dec. 20, 2022, 5:56 a.m. | OK | GNU C++17 | TESTS | 10 | 0 | 0 | ||
186063322 | Kya_kroge_jaanke | A | Dec. 20, 2022, 5:20 a.m. | OK | GNU C++17 | TESTS | 10 | 0 | 0 | ||
186065668 | whohet | A | Dec. 20, 2022, 5:54 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 0 | 0 | ||
186061380 | Alex_Wei | A | Dec. 20, 2022, 4:51 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 0 | 0 | ||
186060737 | CSUST_GXL | A | Dec. 20, 2022, 4:40 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 0 | 0 | ||
186060473 | saurabhNegi187 | A | Dec. 20, 2022, 4:35 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 0 | 0 | ||
186059275 | mister_ezio_ | A | Dec. 20, 2022, 4:14 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 0 | 0 | ||
186055187 | komeiji_koishi514 | A | Dec. 20, 2022, 3:02 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 0 | 0 | ||
186054536 | baophuccqt | A | Dec. 20, 2022, 2:48 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 0 | 0 | ||
186051381 | Awesome3.14 | A | Dec. 20, 2022, 1:21 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 0 | 0 | ||
186043857 | stan23456 | A | Dec. 19, 2022, 9:21 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 0 | 0 | ||
186041892 | mesbah19 | A | Dec. 19, 2022, 8:43 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 0 | 0 | ||
186065309 | Santosh2105 | A | Dec. 20, 2022, 5:49 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 0 | 0 | ||
186064901 | the-viz | A | Dec. 20, 2022, 5:43 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 0 | 0 | ||
186064790 | darkdulgi | A | Dec. 20, 2022, 5:42 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 0 | 0 | ||
186064318 | learner__ | A | Dec. 20, 2022, 5:35 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 0 | 0 | ||
186064264 | Cy.2y | A | Dec. 20, 2022, 5:34 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 0 | 0 | ||
186064106 | uniquevikash1 | A | Dec. 20, 2022, 5:32 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 0 | 0 | ||
186063672 | Abdul_Aziz | A | Dec. 20, 2022, 5:26 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 0 | 0 | ||
186065633 | Kodaman | A | Dec. 20, 2022, 5:53 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 0 | 0 | ||
186065882 | kanwaekan | A | Dec. 20, 2022, 5:56 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 0 | 0 | ||
186066045 | mssohel_rana | A | Dec. 20, 2022, 5:59 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 0 | 0 | ||
186061841 | singhshivsm20001 | A | Dec. 20, 2022, 4:57 a.m. | OK | Java 11 | TESTS | 10 | 155 | 0 | ||
186029359 | Siddharth_Singh_here | A | Dec. 19, 2022, 6:28 p.m. | OK | Java 11 | TESTS | 10 | 155 | 0 | ||
186048311 | DOOMJUICE | A | Dec. 19, 2022, 11:33 p.m. | OK | Java 11 | TESTS | 10 | 170 | 0 | ||
186017817 | personal_gym | A | Dec. 19, 2022, 5:14 p.m. | OK | Java 11 | TESTS | 10 | 170 | 0 | ||
186059543 | bitup62 | A | Dec. 20, 2022, 4:19 a.m. | OK | Java 11 | TESTS | 10 | 171 | 0 | ||
186027360 | A_rock_win | A | Dec. 19, 2022, 6:13 p.m. | OK | Java 11 | TESTS | 10 | 187 | 0 | ||
186016270 | dalmatinec | A | Dec. 19, 2022, 5:07 p.m. | OK | Java 11 | TESTS | 10 | 202 | 0 | ||
186064195 | achal5623 | A | Dec. 20, 2022, 5:33 a.m. | OK | Java 11 | TESTS | 10 | 217 | 0 | ||
186005597 | SANJAYKUMAR_V | A | Dec. 19, 2022, 4:18 p.m. | OK | Java 11 | TESTS | 10 | 218 | 0 | ||
186006416 | Aseque | A | Dec. 19, 2022, 4:21 p.m. | OK | Java 11 | TESTS | 10 | 233 | 0 | ||
186034528 | Suraj1607 | A | Dec. 19, 2022, 7:12 p.m. | OK | Java 17 | TESTS | 10 | 171 | 614400 | ||
186052421 | iamJatinYadav | A | Dec. 20, 2022, 1:50 a.m. | OK | Java 17 | TESTS | 10 | 171 | 716800 | ||
186045881 | merlin_ | A | Dec. 19, 2022, 10:11 p.m. | OK | Java 17 | TESTS | 10 | 186 | 0 | ||
186017856 | yashbhardwaj24 | A | Dec. 19, 2022, 5:14 p.m. | OK | Java 17 | TESTS | 10 | 186 | 41984000 | ||
186039096 | AL-Muzahid | A | Dec. 19, 2022, 7:59 p.m. | OK | Java 17 | TESTS | 10 | 187 | 409600 | ||
186025559 | KarMa_ | A | Dec. 19, 2022, 6 p.m. | OK | Java 17 | TESTS | 10 | 187 | 512000 | ||
186022900 | irachit0702 | A | Dec. 19, 2022, 5:43 p.m. | OK | Java 17 | TESTS | 10 | 217 | 307200 | ||
186005409 | sam02202001 | A | Dec. 19, 2022, 4:18 p.m. | OK | Java 17 | TESTS | 10 | 217 | 921600 | ||
186003830 | yerkebayev | A | Dec. 19, 2022, 4:14 p.m. | OK | Java 17 | TESTS | 10 | 217 | 9728000 | ||
186011036 | zoxzoxzoxzox | A | Dec. 19, 2022, 4:32 p.m. | OK | Java 17 | TESTS | 10 | 218 | 819200 | ||
186049764 | ikillmyself | A | Dec. 20, 2022, 12:30 a.m. | OK | Java 8 | TESTS | 10 | 93 | 0 | ||
186032236 | gagan_6730 | A | Dec. 19, 2022, 6:51 p.m. | OK | Java 8 | TESTS | 10 | 93 | 0 | ||
186028908 | rish1896 | A | Dec. 19, 2022, 6:24 p.m. | OK | Java 8 | TESTS | 10 | 93 | 0 | ||
186036839 | imvivekthakur | A | Dec. 19, 2022, 7:35 p.m. | OK | Java 8 | TESTS | 10 | 108 | 0 | ||
186024131 | Koka | A | Dec. 19, 2022, 5:51 p.m. | OK | Java 8 | TESTS | 10 | 108 | 0 | ||
186008494 | umeshsharma08095 | A | Dec. 19, 2022, 4:26 p.m. | OK | Java 8 | TESTS | 10 | 108 | 0 | ||
186004318 | alikhan_emes | A | Dec. 19, 2022, 4:15 p.m. | OK | Java 8 | TESTS | 10 | 109 | 0 | ||
186057654 | hemantlodha1000 | A | Dec. 20, 2022, 3:46 a.m. | OK | Java 8 | TESTS | 10 | 124 | 0 | ||
186020075 | toufique_husein | A | Dec. 19, 2022, 5:26 p.m. | OK | Java 8 | TESTS | 10 | 124 | 0 | ||
186005093 | Kudiret | A | Dec. 19, 2022, 4:17 p.m. | OK | Java 8 | TESTS | 10 | 124 | 0 | ||
186002931 | gelbelachente | A | Dec. 19, 2022, 4:11 p.m. | OK | Kotlin 1.7 | TESTS | 10 | 264 | 0 | ||
186027557 | shorya1835 | A | Dec. 19, 2022, 6:14 p.m. | OK | MS C++ 2017 | TESTS | 10 | 0 | 102400 | ||
186052628 | Aksurana | A | Dec. 20, 2022, 1:55 a.m. | OK | MS C++ 2017 | TESTS | 10 | 15 | 0 | ||
186008093 | kj_khushi | A | Dec. 19, 2022, 4:25 p.m. | OK | MS C++ 2017 | TESTS | 10 | 15 | 0 | ||
186054532 | lonelyness | A | Dec. 20, 2022, 2:48 a.m. | OK | MS C++ 2017 | TESTS | 10 | 15 | 102400 | ||
186053852 | hua_yi_jiu | A | Dec. 20, 2022, 2:31 a.m. | OK | MS C++ 2017 | TESTS | 10 | 15 | 3993600 | ||
186053834 | Igorjan94 | A | Dec. 20, 2022, 2:30 a.m. | OK | Node.js | TESTS | 10 | 46 | 102400 | ||
186057558 | n.n.n.kz | A | Dec. 20, 2022, 3:44 a.m. | OK | PHP | TESTS | 10 | 31 | 0 | ||
186062763 | EurusHolmes | A | Dec. 20, 2022, 5:12 a.m. | OK | PyPy 2 | TESTS | 10 | 108 | 1843200 | ||
186029516 | plevande | A | Dec. 19, 2022, 6:29 p.m. | OK | PyPy 3 | TESTS | 10 | 77 | 0 | ||
186006516 | harshini.paranjape | A | Dec. 19, 2022, 4:21 p.m. | OK | PyPy 3 | TESTS | 10 | 77 | 0 | ||
186029152 | shriom533 | A | Dec. 19, 2022, 6:26 p.m. | OK | PyPy 3 | TESTS | 10 | 77 | 7168000 | ||
186049491 | lyreloi | A | Dec. 20, 2022, 12:20 a.m. | OK | PyPy 3 | TESTS | 10 | 92 | 1945600 | ||
186062076 | whoamelse | A | Dec. 20, 2022, 5:01 a.m. | OK | PyPy 3 | TESTS | 10 | 93 | 0 | ||
186047851 | kunal_14s | A | Dec. 19, 2022, 11:15 p.m. | OK | PyPy 3 | TESTS | 10 | 93 | 0 | ||
186037772 | chgliu | A | Dec. 19, 2022, 7:45 p.m. | OK | PyPy 3 | TESTS | 10 | 93 | 1638400 | ||
186041214 | grawlixes | A | Dec. 19, 2022, 8:31 p.m. | OK | PyPy 3 | TESTS | 10 | 109 | 1843200 | ||
186052402 | Raindrops1117 | A | Dec. 20, 2022, 1:49 a.m. | OK | PyPy 3 | TESTS | 10 | 249 | 6860800 | ||
186046236 | anshumannandan | A | Dec. 19, 2022, 10:21 p.m. | OK | PyPy 3-64 | TESTS | 10 | 46 | 0 | ||
186031207 | Trem0r | A | Dec. 19, 2022, 6:43 p.m. | OK | PyPy 3-64 | TESTS | 10 | 46 | 0 | ||
186016598 | biglunchdude | A | Dec. 19, 2022, 5:08 p.m. | OK | PyPy 3-64 | TESTS | 10 | 46 | 0 | ||
186049900 | crapcode | A | Dec. 20, 2022, 12:34 a.m. | OK | PyPy 3-64 | TESTS | 10 | 61 | 0 | ||
186029755 | OmarMoBadr | A | Dec. 19, 2022, 6:31 p.m. | OK | PyPy 3-64 | TESTS | 10 | 61 | 0 | ||
186023511 | H3X460N157 | A | Dec. 19, 2022, 5:47 p.m. | OK | PyPy 3-64 | TESTS | 10 | 61 | 0 | ||
186057613 | Remineva | A | Dec. 20, 2022, 3:46 a.m. | OK | PyPy 3-64 | TESTS | 10 | 62 | 0 | ||
186050212 | alaa81313 | A | Dec. 20, 2022, 12:45 a.m. | OK | PyPy 3-64 | TESTS | 10 | 62 | 0 | ||
186049982 | crapcode | A | Dec. 20, 2022, 12:37 a.m. | OK | PyPy 3-64 | TESTS | 10 | 62 | 0 | ||
186034404 | Nabeel_Ismaeel | A | Dec. 19, 2022, 7:11 p.m. | OK | PyPy 3-64 | TESTS | 10 | 62 | 0 | ||
186054552 | kulwantraj1997 | A | Dec. 20, 2022, 2:48 a.m. | OK | Python 3 | TESTS | 10 | 31 | 0 | ||
186054183 | prathamnagaria | A | Dec. 20, 2022, 2:39 a.m. | OK | Python 3 | TESTS | 10 | 31 | 0 | ||
186041762 | MrTomas150 | A | Dec. 19, 2022, 8:41 p.m. | OK | Python 3 | TESTS | 10 | 31 | 0 | ||
186016612 | mariemmohamed200713 | A | Dec. 19, 2022, 5:08 p.m. | OK | Python 3 | TESTS | 10 | 31 | 0 | ||
186063299 | omar.gawdat | A | Dec. 20, 2022, 5:20 a.m. | OK | Python 3 | TESTS | 10 | 46 | 0 | ||
186061645 | teyouale | A | Dec. 20, 2022, 4:55 a.m. | OK | Python 3 | TESTS | 10 | 46 | 0 | ||
186059663 | L.Rushi | A | Dec. 20, 2022, 4:21 a.m. | OK | Python 3 | TESTS | 10 | 46 | 0 | ||
186040851 | samread81 | A | Dec. 19, 2022, 8:26 p.m. | OK | Python 3 | TESTS | 10 | 46 | 0 | ||
186022636 | amonikag | A | Dec. 19, 2022, 5:41 p.m. | OK | Python 3 | TESTS | 10 | 46 | 0 | ||
186015472 | pranavkumar | A | Dec. 19, 2022, 5:04 p.m. | OK | Python 3 | TESTS | 10 | 46 | 0 |
Back to search problems