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 |
---|---|---|---|---|---|---|
1646 | Codeforces Round 774 (Div. 2) | FINISHED | False | 7200 | 85415099 | March 4, 2022, 3:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 21236 ) | B | Quality vs Quantity | PROGRAMMING | brute force constructive algorithms greedy sortings two pointers | 800 |
B' def myred#1{ color{red}{ underline{ bf{#1}}}} def myblue#1{ color{blue}{ overline{ bf{#1}}}} def RED{ myred{Red}} def BLUE{ myblue{Blue}} You are given a sequence of n non-negative integers a_1, a_2, ldots, a_n . Initially, all the elements of the sequence are unpainted. You can paint each number RED or BLUE (but not both), or leave it unpainted. For a color c , text{Count}(c) is the number of elements in the sequence painted with that color and text{Sum}(c) is the sum of the elements in the sequence painted with that color. For example, if the given sequence is [2, 8, 6, 3, 1] and it is painted this way: [ myblue{2}, 8, myred{6}, myblue{3}, 1] (where 6 is painted red, 2 and 3 are painted blue, 1 and 8 are unpainted) then text{Sum}( RED)=6 , text{Sum}( BLUE)=2+3=5 , text{Count}( RED)=1 , and text{Count}( BLUE)=2 . Determine if it is possible to paint the sequence so that text{Sum}( RED) > text{Sum}( BLUE) and text{Count}( RED) < text{Count}( BLUE) . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 1000 ). Description of the test cases follows. The first line of each test case contains an integer n ( 3 <= n <= 2 cdot 10^5 ) -- the length of the given sequence. The second line of each test case contains n integers a_1,a_2, ldots,a_n ( 0 <= a_i <= 10^9 ) -- the given sequence. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, print YES if it is possible to paint the given sequence satisfying the above requirements, and NO otherwise. You can output YES and NO in any case (for example, strings yEs, yes, Yes and YES will be recognized as a positive response). In the first test case, there is no possible way to paint the sequence. For example, if you paint th'... |
Codeforces Round #774 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
148423866 | Hash1029 | B | March 5, 2022, 5:55 a.m. | OK | GNU C11 | TESTS | 35 | 62 | 819200 | 800 | |
148390890 | pracacc123 | B | March 4, 2022, 7:04 p.m. | OK | GNU C11 | TESTS | 35 | 77 | 1638400 | 800 | |
148390381 | Murli_33 | B | March 4, 2022, 6:58 p.m. | OK | GNU C11 | TESTS | 35 | 77 | 1638400 | 800 | |
148408630 | 127001evil | B | March 5, 2022, 2:17 a.m. | OK | GNU C11 | TESTS | 35 | 78 | 921600 | 800 | |
148392147 | saurabhtrigunayat90 | B | March 4, 2022, 7:21 p.m. | OK | GNU C11 | TESTS | 35 | 78 | 1638400 | 800 | |
148413363 | tejas2 | B | March 5, 2022, 3:46 a.m. | OK | GNU C11 | TESTS | 35 | 78 | 1638400 | 800 | |
148418113 | pushkraj | B | March 5, 2022, 4:54 a.m. | OK | GNU C11 | TESTS | 35 | 78 | 1638400 | 800 | |
148408218 | Ananya_V24 | B | March 5, 2022, 2:09 a.m. | OK | GNU C11 | TESTS | 35 | 78 | 3174400 | 800 | |
148378501 | KimidiRamya | B | March 4, 2022, 5:24 p.m. | OK | GNU C11 | TESTS | 35 | 93 | 3174400 | 800 | |
148409366 | zwh1234 | B | March 5, 2022, 2:33 a.m. | OK | GNU C++14 | TESTS | 35 | 46 | 2355200 | 800 | |
148406542 | Hush | B | March 5, 2022, 1:34 a.m. | OK | GNU C++14 | TESTS | 35 | 61 | 2355200 | 800 | |
148408814 | AIM-9X | B | March 5, 2022, 2:21 a.m. | OK | GNU C++14 | TESTS | 35 | 62 | 819200 | 800 | |
148406352 | Xerxes_2002 | B | March 5, 2022, 1:30 a.m. | OK | GNU C++14 | TESTS | 35 | 62 | 819200 | 800 | |
148394972 | ItsAboudTime | B | March 4, 2022, 7:56 p.m. | OK | GNU C++14 | TESTS | 35 | 62 | 819200 | 800 | |
148422256 | om1429888 | B | March 5, 2022, 5:40 a.m. | OK | GNU C++14 | TESTS | 35 | 62 | 819200 | 800 | |
148417927 | vinnithepooh | B | March 5, 2022, 4:51 a.m. | OK | GNU C++14 | TESTS | 35 | 62 | 819200 | 800 | |
148409808 | weenie_Xue | B | March 5, 2022, 2:41 a.m. | OK | GNU C++14 | TESTS | 35 | 62 | 819200 | 800 | |
148409229 | ARaX1 | B | March 5, 2022, 2:29 a.m. | OK | GNU C++14 | TESTS | 35 | 62 | 819200 | 800 | |
148406418 | gzchenben | B | March 5, 2022, 1:31 a.m. | OK | GNU C++14 | TESTS | 35 | 62 | 819200 | 800 | |
148414201 | vikram110703 | B | March 5, 2022, 4 a.m. | OK | GNU C++17 | TESTS | 35 | 62 | 819200 | 800 | |
148422047 | coris | B | March 5, 2022, 5:38 a.m. | OK | GNU C++17 | TESTS | 35 | 62 | 819200 | 800 | |
148414058 | aditya43 | B | March 5, 2022, 3:58 a.m. | OK | GNU C++17 | TESTS | 35 | 62 | 819200 | 800 | |
148413602 | zzl340 | B | March 5, 2022, 3:51 a.m. | OK | GNU C++17 | TESTS | 35 | 62 | 819200 | 800 | |
148412726 | Newbie-Lin | B | March 5, 2022, 3:34 a.m. | OK | GNU C++17 | TESTS | 35 | 62 | 819200 | 800 | |
148412349 | pjccccc | B | March 5, 2022, 3:28 a.m. | OK | GNU C++17 | TESTS | 35 | 62 | 819200 | 800 | |
148408805 | imitate20021 | B | March 5, 2022, 2:21 a.m. | OK | GNU C++17 | TESTS | 35 | 62 | 819200 | 800 | |
148406359 | Mine_qihang | B | March 5, 2022, 1:30 a.m. | OK | GNU C++17 | TESTS | 35 | 62 | 819200 | 800 | |
148400939 | AbdullahBitar | B | March 4, 2022, 9:52 p.m. | OK | GNU C++17 | TESTS | 35 | 62 | 819200 | 800 | |
148397306 | OmarAnalog | B | March 4, 2022, 8:31 p.m. | OK | GNU C++17 | TESTS | 35 | 62 | 819200 | 800 | |
148386593 | cabinary | B | March 4, 2022, 6:30 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 46 | 819200 | 800 | |
148410888 | FoXreign | B | March 5, 2022, 3:03 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 46 | 819200 | 800 | |
148409556 | Steins__Gate | B | March 5, 2022, 2:36 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 46 | 819200 | 800 | |
148408154 | qingyanng | B | March 5, 2022, 2:08 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 46 | 819200 | 800 | |
148396291 | avicodes | B | March 4, 2022, 8:14 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 46 | 819200 | 800 | |
148410902 | Dog_food_is_me | B | March 5, 2022, 3:03 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 46 | 1228800 | 800 | |
148418362 | iLLusio | B | March 5, 2022, 4:57 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 46 | 1638400 | 800 | |
148416113 | programmer765 | B | March 5, 2022, 4:29 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 46 | 1638400 | 800 | |
148419544 | Sparrow. | B | March 5, 2022, 5:11 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 46 | 1638400 | 800 | |
148423497 | mashed_aloo | B | March 5, 2022, 5:52 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 46 | 1638400 | 800 | |
148408191 | SoWeR1 | B | March 5, 2022, 2:09 a.m. | OK | GNU C++20 (64) | TESTS | 35 | 31 | 819200 | 800 | |
148422233 | zuber_23 | B | March 5, 2022, 5:40 a.m. | OK | GNU C++20 (64) | TESTS | 35 | 31 | 819200 | 800 | |
148387249 | ishwarendra | B | March 4, 2022, 6:34 p.m. | OK | GNU C++20 (64) | TESTS | 35 | 31 | 1638400 | 800 | |
148407693 | zycac | B | March 5, 2022, 2 a.m. | OK | GNU C++20 (64) | TESTS | 35 | 31 | 1638400 | 800 | |
148418057 | nesco | B | March 5, 2022, 4:53 a.m. | OK | GNU C++20 (64) | TESTS | 35 | 31 | 1638400 | 800 | |
148420477 | AcqingX | B | March 5, 2022, 5:21 a.m. | OK | GNU C++20 (64) | TESTS | 35 | 46 | 819200 | 800 | |
148419199 | Mikkely | B | March 5, 2022, 5:06 a.m. | OK | GNU C++20 (64) | TESTS | 35 | 46 | 819200 | 800 | |
148424363 | devillove084 | B | March 5, 2022, 6 a.m. | OK | GNU C++20 (64) | TESTS | 35 | 46 | 819200 | 800 | |
148420523 | gupta6007 | B | March 5, 2022, 5:22 a.m. | OK | GNU C++20 (64) | TESTS | 35 | 46 | 819200 | 800 | |
148419929 | danish_droid | B | March 5, 2022, 5:15 a.m. | OK | GNU C++20 (64) | TESTS | 35 | 46 | 819200 | 800 | |
148376765 | rcamposnunes | B | March 4, 2022, 5:20 p.m. | OK | Go | TESTS | 35 | 202 | 4300800 | 800 | |
148379100 | koqo | B | March 4, 2022, 5:26 p.m. | OK | Go | TESTS | 35 | 202 | 4403200 | 800 | |
148390370 | snroy | B | March 4, 2022, 6:58 p.m. | OK | Haskell | TESTS | 35 | 1669 | 106086400 | 800 | |
148387124 | sinnay | B | March 4, 2022, 6:33 p.m. | OK | Java 11 | TESTS | 35 | 202 | 0 | 800 | |
148417270 | shubham202012 | B | March 5, 2022, 4:43 a.m. | OK | Java 11 | TESTS | 35 | 217 | 0 | 800 | |
148414247 | arthuryuan15 | B | March 5, 2022, 4:01 a.m. | OK | Java 11 | TESTS | 35 | 218 | 3891200 | 800 | |
148398535 | yudi23 | B | March 4, 2022, 8:55 p.m. | OK | Java 11 | TESTS | 35 | 233 | 3174400 | 800 | |
148414477 | arthuryuan15 | B | March 5, 2022, 4:05 a.m. | OK | Java 11 | TESTS | 35 | 233 | 3891200 | 800 | |
148414338 | arthuryuan15 | B | March 5, 2022, 4:03 a.m. | OK | Java 11 | TESTS | 35 | 233 | 3891200 | 800 | |
148394884 | BhargavModha | B | March 4, 2022, 7:54 p.m. | OK | Java 11 | TESTS | 35 | 234 | 3174400 | 800 | |
148414372 | arthuryuan15 | B | March 5, 2022, 4:03 a.m. | OK | Java 11 | TESTS | 35 | 248 | 3891200 | 800 | |
148416331 | arthuryuan15 | B | March 5, 2022, 4:31 a.m. | OK | Java 11 | TESTS | 35 | 248 | 4096000 | 800 | |
148424408 | MrOtter | B | March 5, 2022, 6:01 a.m. | OK | Java 11 | TESTS | 35 | 249 | 3174400 | 800 | |
148387951 | ak_ankit | B | March 4, 2022, 6:38 p.m. | OK | Java 8 | TESTS | 35 | 171 | 11468800 | 800 | |
148414393 | fyseus | B | March 5, 2022, 4:04 a.m. | OK | Java 8 | TESTS | 35 | 171 | 11468800 | 800 | |
148397525 | rockharshitmaurya | B | March 4, 2022, 8:35 p.m. | OK | Java 8 | TESTS | 35 | 171 | 11468800 | 800 | |
148377062 | Atuer | B | March 4, 2022, 5:21 p.m. | OK | Java 8 | TESTS | 35 | 187 | 0 | 800 | |
148398959 | adi_daredevil | B | March 4, 2022, 9:03 p.m. | OK | Java 8 | TESTS | 35 | 187 | 11468800 | 800 | |
148407428 | cc4414 | B | March 5, 2022, 1:54 a.m. | OK | Java 8 | TESTS | 35 | 217 | 9728000 | 800 | |
148410518 | gauravbajaj | B | March 5, 2022, 2:56 a.m. | OK | Java 8 | TESTS | 35 | 217 | 12902400 | 800 | |
148395394 | suyash.211.sn | B | March 4, 2022, 8:01 p.m. | OK | Java 8 | TESTS | 35 | 218 | 12902400 | 800 | |
148407903 | amit_roy | B | March 5, 2022, 2:03 a.m. | OK | Java 8 | TESTS | 35 | 218 | 13004800 | 800 | |
148407120 | cc4414 | B | March 5, 2022, 1:48 a.m. | OK | Java 8 | TESTS | 35 | 233 | 9728000 | 800 | |
148418924 | mo3az01 | B | March 5, 2022, 5:03 a.m. | OK | Kotlin 1.5 | TESTS | 35 | 670 | 28467200 | 800 | |
148381582 | LizaLobanova0804 | B | March 4, 2022, 5:31 p.m. | OK | MS C++ 2017 | TESTS | 35 | 202 | 819200 | 800 | |
148382086 | kriksnonsi | B | March 4, 2022, 5:32 p.m. | OK | MS C++ 2017 | TESTS | 35 | 218 | 819200 | 800 | |
148389042 | gabalawy | B | March 4, 2022, 6:46 p.m. | OK | MS C++ 2017 | TESTS | 35 | 218 | 1638400 | 800 | |
148379903 | Faraonn_07 | B | March 4, 2022, 5:27 p.m. | OK | MS C++ 2017 | TESTS | 35 | 218 | 4812800 | 800 | |
148380603 | Dybulina_Anna | B | March 4, 2022, 5:29 p.m. | OK | MS C++ 2017 | TESTS | 35 | 234 | 819200 | 800 | |
148398639 | ansergeyg | B | March 4, 2022, 8:57 p.m. | OK | .NET Core C# | TESTS | 35 | 124 | 27852800 | 800 | |
148386483 | 1_2_3_4_5_9 | B | March 4, 2022, 6:29 p.m. | OK | PyPy 2 | TESTS | 35 | 171 | 18124800 | 800 | |
148394177 | ca3sar | B | March 4, 2022, 7:45 p.m. | OK | PyPy 3 | TESTS | 35 | 171 | 25804800 | 800 | |
148395963 | ca3sar | B | March 4, 2022, 8:09 p.m. | OK | PyPy 3 | TESTS | 35 | 171 | 26214400 | 800 | |
148416944 | dominator1234 | B | March 5, 2022, 4:39 a.m. | OK | PyPy 3 | TESTS | 35 | 295 | 22835200 | 800 | |
148415298 | ambs_ | B | March 5, 2022, 4:18 a.m. | OK | PyPy 3 | TESTS | 35 | 296 | 19456000 | 800 | |
148407442 | grawlixes | B | March 5, 2022, 1:55 a.m. | OK | PyPy 3 | TESTS | 35 | 311 | 17408000 | 800 | |
148411763 | YashNandwana | B | March 5, 2022, 3:19 a.m. | OK | PyPy 3 | TESTS | 35 | 311 | 17715200 | 800 | |
148382559 | adil17ds | B | March 4, 2022, 5:33 p.m. | OK | PyPy 3 | TESTS | 35 | 327 | 18534400 | 800 | |
148408103 | crapcode | B | March 5, 2022, 2:07 a.m. | OK | PyPy 3 | TESTS | 35 | 342 | 18432000 | 800 | |
148393595 | zxcuser2 | B | March 4, 2022, 7:38 p.m. | OK | PyPy 3 | TESTS | 35 | 343 | 19148800 | 800 | |
148390331 | Afsan_Habib | B | March 4, 2022, 6:58 p.m. | OK | PyPy 3 | TESTS | 35 | 343 | 19763200 | 800 | |
148399486 | sigilius | B | March 4, 2022, 9:16 p.m. | OK | PyPy 3-64 | TESTS | 35 | 124 | 31129600 | 800 | |
148420936 | nicku123 | B | March 5, 2022, 5:26 a.m. | OK | PyPy 3-64 | TESTS | 35 | 155 | 28979200 | 800 | |
148396420 | _icy_ | B | March 4, 2022, 8:17 p.m. | OK | PyPy 3-64 | TESTS | 35 | 265 | 22323200 | 800 | |
148413614 | DarkHorse_it_iz | B | March 5, 2022, 3:51 a.m. | OK | PyPy 3-64 | TESTS | 35 | 265 | 28467200 | 800 | |
148402585 | samchen123 | B | March 4, 2022, 10:47 p.m. | OK | PyPy 3-64 | TESTS | 35 | 280 | 28467200 | 800 | |
148397599 | wolfram_ | B | March 4, 2022, 8:36 p.m. | OK | PyPy 3-64 | TESTS | 35 | 280 | 28467200 | 800 | |
148400313 | Shady.ELharakly | B | March 4, 2022, 9:35 p.m. | OK | PyPy 3-64 | TESTS | 35 | 295 | 28672000 | 800 | |
148404540 | Xandus | B | March 5, 2022, 12:33 a.m. | OK | PyPy 3-64 | TESTS | 35 | 296 | 13516800 | 800 | |
148389222 | Ibne_Hassan | B | March 4, 2022, 6:48 p.m. | OK | PyPy 3-64 | TESTS | 35 | 311 | 22528000 | 800 | |
148417630 | sai_vicky | B | March 5, 2022, 4:48 a.m. | OK | PyPy 3-64 | TESTS | 35 | 311 | 28672000 | 800 | |
148421597 | acmyhy | B | March 5, 2022, 5:33 a.m. | OK | Python 3 | TESTS | 35 | 187 | 18022400 | 800 | |
148390283 | Afsan_Habib | B | March 4, 2022, 6:57 p.m. | OK | Python 3 | TESTS | 35 | 187 | 18022400 | 800 | |
148390033 | StipeB | B | March 4, 2022, 6:55 p.m. | OK | Python 3 | TESTS | 35 | 187 | 18022400 | 800 | |
148380839 | ansh02shiv | B | March 4, 2022, 5:30 p.m. | OK | Python 3 | TESTS | 35 | 187 | 18022400 | 800 | |
148391258 | gck_16 | B | March 4, 2022, 7:07 p.m. | OK | Python 3 | TESTS | 35 | 187 | 18432000 | 800 | |
148418169 | woodsman | B | March 5, 2022, 4:54 a.m. | OK | Python 3 | TESTS | 35 | 202 | 17817600 | 800 | |
148416359 | NAVEEDAHMED | B | March 5, 2022, 4:32 a.m. | OK | Python 3 | TESTS | 35 | 202 | 18022400 | 800 | |
148404677 | blackswan9k | B | March 5, 2022, 12:38 a.m. | OK | Python 3 | TESTS | 35 | 202 | 18022400 | 800 | |
148381874 | harry_10 | B | March 4, 2022, 5:32 p.m. | OK | Python 3 | TESTS | 35 | 202 | 18022400 | 800 | |
148405652 | Dahoas | B | March 5, 2022, 1:11 a.m. | OK | Python 3 | TESTS | 35 | 217 | 18022400 | 800 |
Back to search problems