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 |
---|---|---|---|---|---|---|
1551 | Codeforces Round 734 (Div. 3) | FINISHED | False | 7200 | 104772299 | July 23, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 15593 ) | B2 | Wonderful Coloring - 2 | PROGRAMMING | binary search constructive algorithms data structures greedy |
B'This problem is an extension of the problem "Wonderful Coloring - 1". It has quite many differences, so you should read this statement completely. Recently, Paul and Mary have found a new favorite sequence of integers a_1, a_2, ... , a_n . They want to paint it using pieces of chalk of k colors. The coloring of a sequence is called wonderful if the following conditions are met: E. xe2 x80 x89g. consider a sequence a=[3, 1, 1, 1, 1, 10, 3, 10, 10, 2] and k=3 . One of the wonderful colorings of the sequence is shown in the figure. Help Paul and Mary to find a wonderful coloring of a given sequence a . The first line contains one integer t ( 1 <= t <= 10000 ) -- the number of test cases. Then t test cases follow. Each test case consists of two lines. The first one contains two integers n and k ( 1 <= n <= 2 cdot10^5 , 1 <= k <= n ) -- the length of a given sequence and the number of colors, respectively. The second one contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= n ). It is guaranteed that the sum of n over all test cases doesn 't exceed 2 cdot 10^5 . Output t lines, each of them must contain a description of a wonderful coloring for the corresponding test case. Each wonderful coloring must be printed as a sequence of n integers c_1, c_2, ... , c_n ( 0 <= c_i <= k ) separated by spaces where Remember that you need to maximize the total count of painted elements for the wonderful coloring. If there are multiple solutions, print any one. In the first test case, the answer is shown in the figure in the statement. The red color has number 1 , the blue color -- 2 , the green -- 3 . '... |
Editorial for Codeforces Round #734 (Div.3) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
123549569 | 20bcs030 | B2 | July 23, 2021, 8:47 p.m. | OK | GNU C11 | TESTS | 8 | 717 | 6860800 | ||
123567363 | fishcathu. | B2 | July 24, 2021, 4:10 a.m. | OK | GNU C++11 | TESTS | 8 | 31 | 7065600 | ||
123525533 | Hardy_Lee | B2 | July 23, 2021, 4:31 p.m. | OK | GNU C++11 | TESTS | 8 | 61 | 8499200 | ||
123561212 | bkifhr10 | B2 | July 24, 2021, 2:26 a.m. | OK | GNU C++11 | TESTS | 8 | 61 | 30310400 | ||
123559569 | jason-wang | B2 | July 24, 2021, 1:53 a.m. | OK | GNU C++11 | TESTS | 8 | 62 | 6860800 | ||
123530818 | DOGGOD_Q | B2 | July 23, 2021, 4:48 p.m. | OK | GNU C++11 | TESTS | 8 | 62 | 7065600 | ||
123560494 | KomeijiSatori | B2 | July 24, 2021, 2:12 a.m. | OK | GNU C++11 | TESTS | 8 | 62 | 12492800 | ||
123557089 | LYC_music | B2 | July 24, 2021, 12:54 a.m. | OK | GNU C++11 | TESTS | 8 | 62 | 14028800 | ||
123560670 | ycycycyc123456 | B2 | July 24, 2021, 2:16 a.m. | OK | GNU C++11 | TESTS | 8 | 77 | 10240000 | ||
123560986 | tianlinkai | B2 | July 24, 2021, 2:22 a.m. | OK | GNU C++11 | TESTS | 8 | 78 | 6348800 | ||
123536689 | zhanxufeng | B2 | July 23, 2021, 5:42 p.m. | OK | GNU C++11 | TESTS | 8 | 78 | 9318400 | ||
123538137 | tg5599 | B2 | July 23, 2021, 6 p.m. | OK | GNU C++14 | TESTS | 8 | 77 | 7782400 | ||
123533078 | aaforce202 | B2 | July 23, 2021, 5:04 p.m. | OK | GNU C++14 | TESTS | 8 | 77 | 11161600 | ||
123548144 | Scotty_switch | B2 | July 23, 2021, 8:19 p.m. | OK | GNU C++14 | TESTS | 8 | 77 | 27136000 | ||
123547581 | yaser01 | B2 | July 23, 2021, 8:10 p.m. | OK | GNU C++14 | TESTS | 8 | 77 | 27136000 | ||
123547761 | GIGA-MIND | B2 | July 23, 2021, 8:13 p.m. | OK | GNU C++14 | TESTS | 8 | 78 | 7270400 | ||
123525537 | thai2113 | B2 | July 23, 2021, 4:31 p.m. | OK | GNU C++14 | TESTS | 8 | 78 | 10240000 | ||
123534401 | BinhNhan247 | B2 | July 23, 2021, 5:16 p.m. | OK | GNU C++14 | TESTS | 8 | 92 | 12697600 | ||
123561694 | madhav10 | B2 | July 24, 2021, 2:35 a.m. | OK | GNU C++14 | TESTS | 8 | 92 | 14848000 | ||
123535336 | victorchan870 | B2 | July 23, 2021, 5:26 p.m. | OK | GNU C++14 | TESTS | 8 | 93 | 6144000 | ||
123534790 | victorchan870 | B2 | July 23, 2021, 5:20 p.m. | OK | GNU C++14 | TESTS | 8 | 93 | 6144000 | ||
123567529 | Proximidial | B2 | July 24, 2021, 4:13 a.m. | OK | GNU C++17 | TESTS | 8 | 77 | 6963200 | ||
123537468 | ACM-Epoch | B2 | July 23, 2021, 5:51 p.m. | OK | GNU C++17 | TESTS | 8 | 77 | 7270400 | ||
123557994 | _Sanzo_ | B2 | July 24, 2021, 1:17 a.m. | OK | GNU C++17 | TESTS | 8 | 77 | 7270400 | ||
123540852 | NTU_sdh | B2 | July 23, 2021, 6:34 p.m. | OK | GNU C++17 | TESTS | 8 | 77 | 7270400 | ||
123546492 | Ante0417 | B2 | July 23, 2021, 7:52 p.m. | OK | GNU C++17 | TESTS | 8 | 77 | 7782400 | ||
123532682 | Ririko | B2 | July 23, 2021, 5:01 p.m. | OK | GNU C++17 | TESTS | 8 | 77 | 7782400 | ||
123542028 | strayghost | B2 | July 23, 2021, 6:49 p.m. | OK | GNU C++17 | TESTS | 8 | 77 | 8499200 | ||
123534781 | MathMate | B2 | July 23, 2021, 5:20 p.m. | OK | GNU C++17 | TESTS | 8 | 77 | 8601600 | ||
123540932 | NourhanAbosaeed | B2 | July 23, 2021, 6:35 p.m. | OK | GNU C++17 | TESTS | 8 | 77 | 9011200 | ||
123549330 | Nivalderramas | B2 | July 23, 2021, 8:42 p.m. | OK | GNU C++17 | TESTS | 8 | 77 | 11161600 | ||
123534960 | rgnerdplayer | B2 | July 23, 2021, 5:22 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 46 | 8908800 | ||
123566065 | syb | B2 | July 24, 2021, 3:47 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 61 | 8908800 | ||
123533172 | apurv001 | B2 | July 23, 2021, 5:05 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 61 | 8908800 | ||
123569230 | cloudcloud | B2 | July 24, 2021, 4:44 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 61 | 10137600 | ||
123570034 | dlbm1302 | B2 | July 24, 2021, 4:58 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 61 | 13209600 | ||
123535068 | BlueCoder123 | B2 | July 23, 2021, 5:23 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 61 | 16998400 | ||
123567137 | iyangye | B2 | July 24, 2021, 4:06 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 62 | 7475200 | ||
123548107 | biection | B2 | July 23, 2021, 8:19 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 62 | 7475200 | ||
123547103 | say_hi | B2 | July 23, 2021, 8:02 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 62 | 7475200 | ||
123557204 | Thebestofthebest | B2 | July 24, 2021, 12:57 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 62 | 7577600 | ||
123573344 | nagu-pm | B2 | July 24, 2021, 5:48 a.m. | OK | Java 11 | TESTS | 13 | 311 | 30412800 | ||
123573499 | nagu-pm | B2 | July 24, 2021, 5:50 a.m. | OK | Java 11 | TESTS | 13 | 312 | 30412800 | ||
123532381 | aismita_98 | B2 | July 23, 2021, 4:59 p.m. | OK | Java 11 | TESTS | 8 | 326 | 39014400 | ||
123526244 | savanpatel | B2 | July 23, 2021, 4:32 p.m. | OK | Java 11 | TESTS | 8 | 421 | 60620800 | ||
123531118 | MubtasimShahriar | B2 | July 23, 2021, 4:50 p.m. | OK | Java 11 | TESTS | 8 | 421 | 62566400 | ||
123534302 | JatinYadav | B2 | July 23, 2021, 5:16 p.m. | OK | Java 11 | TESTS | 8 | 436 | 67891200 | ||
123574297 | SaberXpro | B2 | July 24, 2021, 5:59 a.m. | OK | Java 11 | TESTS | 13 | 452 | 72192000 | ||
123563662 | mphillotry | B2 | July 24, 2021, 3:08 a.m. | OK | Java 11 | TESTS | 8 | 514 | 75571200 | ||
123542208 | siva03 | B2 | July 23, 2021, 6:52 p.m. | OK | Java 11 | TESTS | 8 | 545 | 65945600 | ||
123531490 | Sumit_jha | B2 | July 23, 2021, 4:52 p.m. | OK | Java 11 | TESTS | 8 | 608 | 57036800 | ||
123525550 | nuni. | B2 | July 23, 2021, 4:31 p.m. | OK | Java 8 | TESTS | 8 | 233 | 37888000 | ||
123561292 | soato1405 | B2 | July 24, 2021, 2:27 a.m. | OK | Java 8 | TESTS | 8 | 264 | 43929600 | ||
123538578 | GoldenShadow | B2 | July 23, 2021, 6:05 p.m. | OK | Java 8 | TESTS | 8 | 264 | 51609600 | ||
123561328 | soato1405 | B2 | July 24, 2021, 2:28 a.m. | OK | Java 8 | TESTS | 8 | 265 | 40038400 | ||
123562379 | soato1405 | B2 | July 24, 2021, 2:46 a.m. | OK | Java 8 | TESTS | 8 | 265 | 40038400 | ||
123560225 | soato1405 | B2 | July 24, 2021, 2:07 a.m. | OK | Java 8 | TESTS | 8 | 280 | 40345600 | ||
123560112 | soato1405 | B2 | July 24, 2021, 2:04 a.m. | OK | Java 8 | TESTS | 8 | 280 | 51507200 | ||
123547035 | themadknight45 | B2 | July 23, 2021, 8:01 p.m. | OK | Java 8 | TESTS | 8 | 295 | 58880000 | ||
123550848 | dev_14 | B2 | July 23, 2021, 9:16 p.m. | OK | Java 8 | TESTS | 8 | 296 | 54067200 | ||
123526852 | priyam_anand | B2 | July 23, 2021, 4:33 p.m. | OK | Java 8 | TESTS | 8 | 311 | 57344000 | ||
123560612 | Spheniscine | B2 | July 24, 2021, 2:15 a.m. | OK | Kotlin | TESTS | 8 | 233 | 41984000 | ||
123540610 | amanpatel23 | B2 | July 23, 2021, 6:31 p.m. | OK | Kotlin | TESTS | 8 | 358 | 78745600 | ||
123542819 | codersanjeev | B2 | July 23, 2021, 7:02 p.m. | OK | Kotlin | TESTS | 8 | 998 | 52736000 | ||
123532901 | Tangerine | B2 | July 23, 2021, 5:03 p.m. | OK | MS C++ 2017 | TESTS | 8 | 249 | 7782400 | ||
123534962 | IAmTheNight2000 | B2 | July 23, 2021, 5:22 p.m. | OK | MS C++ 2017 | TESTS | 8 | 265 | 6144000 | ||
123571809 | dlehgns011 | B2 | July 24, 2021, 5:26 a.m. | OK | MS C++ 2017 | TESTS | 8 | 312 | 17408000 | ||
123544379 | codmacian | B2 | July 23, 2021, 7:22 p.m. | OK | MS C++ 2017 | TESTS | 8 | 327 | 13107200 | ||
123544290 | Osama_Gharib | B2 | July 23, 2021, 7:21 p.m. | OK | MS C++ 2017 | TESTS | 8 | 373 | 18841600 | ||
123565593 | zwb | B2 | July 24, 2021, 3:40 a.m. | OK | MS C++ 2017 | TESTS | 8 | 452 | 8601600 | ||
123562756 | js1915wzh | B2 | July 24, 2021, 2:53 a.m. | OK | MS C++ 2017 | TESTS | 8 | 529 | 7782400 | ||
123527711 | T-404 | B2 | July 23, 2021, 4:34 p.m. | OK | MS C++ 2017 | TESTS | 8 | 560 | 19148800 | ||
123568034 | 202003021019 | B2 | July 24, 2021, 4:22 a.m. | OK | MS C++ 2017 | TESTS | 8 | 779 | 6963200 | ||
123529894 | notcompel | B2 | July 23, 2021, 4:42 p.m. | OK | MS C++ 2017 | TESTS | 8 | 904 | 13414400 | ||
123546725 | Rumman93 | B2 | July 23, 2021, 7:56 p.m. | OK | .NET Core C# | TESTS | 8 | 763 | 64512000 | ||
123534089 | chinesedfan | B2 | July 23, 2021, 5:14 p.m. | OK | Node.js | TESTS | 8 | 311 | 54476800 | ||
123546176 | yash490 | B2 | July 23, 2021, 7:48 p.m. | OK | PyPy 3 | TESTS | 8 | 249 | 50073600 | ||
123534719 | Andrei_Kuz | B2 | July 23, 2021, 5:19 p.m. | OK | PyPy 3 | TESTS | 8 | 249 | 61747200 | ||
123535678 | armsusman | B2 | July 23, 2021, 5:29 p.m. | OK | PyPy 3 | TESTS | 8 | 264 | 54681600 | ||
123528530 | sethhritik | B2 | July 23, 2021, 4:36 p.m. | OK | PyPy 3 | TESTS | 8 | 296 | 49254400 | ||
123531669 | okay123 | B2 | July 23, 2021, 4:53 p.m. | OK | PyPy 3 | TESTS | 8 | 311 | 58777600 | ||
123552630 | songtae | B2 | July 23, 2021, 10:03 p.m. | OK | PyPy 3 | TESTS | 8 | 327 | 53145600 | ||
123529354 | HETRAKESHFADIA | B2 | July 23, 2021, 4:39 p.m. | OK | PyPy 3 | TESTS | 8 | 373 | 60825600 | ||
123536749 | bjy | B2 | July 23, 2021, 5:43 p.m. | OK | PyPy 3 | TESTS | 8 | 390 | 65433600 | ||
123562796 | Soul_Silver | B2 | July 24, 2021, 2:53 a.m. | OK | PyPy 3 | TESTS | 8 | 436 | 65126400 | ||
123532866 | caow | B2 | July 23, 2021, 5:02 p.m. | OK | PyPy 3 | TESTS | 8 | 436 | 73728000 | ||
123565048 | cloudmist | B2 | July 24, 2021, 3:32 a.m. | OK | Python 3 | TESTS | 8 | 343 | 40755200 | ||
123554944 | Westin_sheep | B2 | July 23, 2021, 11:26 p.m. | OK | Python 3 | TESTS | 8 | 420 | 36761600 | ||
123542560 | NS3081992 | B2 | July 23, 2021, 6:58 p.m. | OK | Python 3 | TESTS | 8 | 436 | 34201600 | ||
123567745 | cloudmist | B2 | July 24, 2021, 4:17 a.m. | OK | Python 3 | TESTS | 8 | 436 | 40755200 | ||
123567412 | cloudmist | B2 | July 24, 2021, 4:11 a.m. | OK | Python 3 | TESTS | 8 | 451 | 40140800 | ||
123567919 | eugalt | B2 | July 24, 2021, 4:20 a.m. | OK | Python 3 | TESTS | 8 | 499 | 32358400 | ||
123567468 | eugalt | B2 | July 24, 2021, 4:12 a.m. | OK | Python 3 | TESTS | 8 | 514 | 31846400 | ||
123547463 | Kagemeka | B2 | July 23, 2021, 8:08 p.m. | OK | Python 3 | TESTS | 8 | 545 | 24780800 | ||
123556190 | DarrenKey | B2 | July 24, 2021, 12:22 a.m. | OK | Python 3 | TESTS | 8 | 545 | 56934400 | ||
123539691 | Coding_RDX | B2 | July 23, 2021, 6:19 p.m. | OK | Python 3 | TESTS | 8 | 546 | 29286400 | ||
123561767 | bqn | B2 | July 24, 2021, 2:37 a.m. | OK | Rust | TESTS | 8 | 139 | 23040000 | ||
123573494 | TAT998244353 | B2 | July 24, 2021, 5:50 a.m. | OK | Rust | TESTS | 13 | 155 | 12492800 | ||
123573759 | TAT998244353 | B2 | July 24, 2021, 5:53 a.m. | OK | Rust | TESTS | 13 | 186 | 12492800 |
Back to search problems