Codeforces Round 531 (Div. 3)

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
1102 Codeforces Round 531 (Div. 3) FINISHED False 7200 184778699 Jan. 9, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10450 ) B Array K-Coloring PROGRAMMING greedy sortings 1400

B'You are given an array a consisting of n integer numbers. You have to color this array in k colors in such a way that: Obviously, such coloring might be impossible. In this case, print "NO". Otherwise print "YES" and any coloring (i.e. numbers c_1, c_2, ... c_n , where 1 <= c_i <= k and c_i is the color of the i -th element of the given array) satisfying the conditions above. If there are multiple answers, you can print any. The first line of the input contains two integers n and k ( 1 <= k <= n <= 5000 ) -- the length of the array a and the number of colors, respectively. The second line of the input contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 5000 ) -- elements of the array a . If there is no answer, print "NO". Otherwise print "YES" and any coloring (i.e. numbers c_1, c_2, ... c_n , where 1 <= c_i <= k and c_i is the color of the i -th element of the given array) satisfying the conditions described in the problem statement. If there are multiple answers, you can print any. In the first example the answer 2~ 1~ 2~ 1 is also acceptable. In the second example the answer 1~ 1~ 1~ 2~ 2 is also acceptable. There exist other acceptable answers for both examples. '...

Tutorials

64439

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
48174394 CoodeForces B Jan. 10, 2019, 8:42 a.m. OK Clang++17 Diagnostics TESTS 119 77 12697600 1400
48594618 gktgnjftm B Jan. 20, 2019, 5:32 a.m. OK Clang++17 Diagnostics TESTS 119 78 11673600 1400
48607297 MaximG B Jan. 20, 2019, 11:40 a.m. OK Clang++17 Diagnostics TESTS 119 93 102400 1400
48578186 jeong000307 B Jan. 19, 2019, 3:12 p.m. OK Clang++17 Diagnostics TESTS 119 93 100966400 1400
54730153 Denor B May 27, 2019, 10:49 p.m. OK Delphi TESTS 119 31 102400 1400
52257506 chaorenhaha B April 3, 2019, 6:46 a.m. OK FPC TESTS 119 46 25088000 1400
52257477 chaorenhaha B April 3, 2019, 6:45 a.m. OK FPC TESTS 119 46 100249600 1400
52257488 chaorenhaha B April 3, 2019, 6:45 a.m. OK FPC TESTS 119 61 29081600 1400
48214700 TShT B Jan. 11, 2019, 2 p.m. OK FPC TESTS 119 62 102400 1400
51816689 chaorenhaha B March 25, 2019, 9:39 a.m. OK FPC TESTS 119 62 25702400 1400
48271324 vjudge3 B Jan. 12, 2019, 2:22 a.m. OK FPC TESTS 119 62 26316800 1400
48271320 luogu_bot4 B Jan. 12, 2019, 2:22 a.m. OK FPC TESTS 119 62 26316800 1400
52290913 chaorenhaha B April 4, 2019, 1:32 a.m. OK FPC TESTS 119 62 29286400 1400
58500188 naranja011223 B Aug. 9, 2019, 1:55 p.m. OK FPC TESTS 119 77 1228800 1400
48271286 luogu_bot4 B Jan. 12, 2019, 2:19 a.m. OK FPC TESTS 119 78 102400 1400
48695305 priyansh_dream B Jan. 21, 2019, 8:41 p.m. OK GNU C11 TESTS 119 31 102400 1400
49184026 maweijian1999 B Jan. 30, 2019, 4:32 a.m. OK GNU C11 TESTS 119 31 102400 1400
65111868 vjudge4 B Nov. 15, 2019, 11:28 p.m. OK GNU C11 TESTS 119 46 102400 1400
49184039 vjudge2 B Jan. 30, 2019, 4:33 a.m. OK GNU C11 TESTS 119 46 102400 1400
49228861 balasiva B Jan. 31, 2019, 3:42 a.m. OK GNU C11 TESTS 119 46 102400 1400
49534257 smit.mangukiya B Feb. 6, 2019, 3:11 p.m. OK GNU C11 TESTS 119 46 102400 1400
49661840 vjudge1 B Feb. 9, 2019, 12:45 p.m. OK GNU C11 TESTS 119 46 102400 1400
49743491 binom B Feb. 10, 2019, 8:09 p.m. OK GNU C11 TESTS 119 46 102400 1400
50549873 kaiboy B Feb. 27, 2019, 2:55 a.m. OK GNU C11 TESTS 119 46 102400 1400
58565319 cs234_shrey B Aug. 11, 2019, 7:39 a.m. OK GNU C11 TESTS 119 46 102400 1400
54847502 luogu_bot4 B May 30, 2019, 2:46 p.m. OK GNU C++11 TESTS 119 31 0 1400
58123389 Prof_BL B Aug. 1, 2019, 11:42 a.m. OK GNU C++11 TESTS 119 31 0 1400
62392440 luogu_bot2 B Oct. 12, 2019, 3:16 a.m. OK GNU C++11 TESTS 119 31 0 1400
65049446 thematrix233 B Nov. 15, 2019, 2 p.m. OK GNU C++11 TESTS 119 31 0 1400
57982265 luogu_bot2 B July 30, 2019, 9:51 a.m. OK GNU C++11 TESTS 119 31 0 1400
57867389 lopare B July 27, 2019, 10:11 p.m. OK GNU C++11 TESTS 119 31 0 1400
57373623 vjudge5 B July 20, 2019, 11:43 a.m. OK GNU C++11 TESTS 119 31 0 1400
57364173 vjudge2 B July 20, 2019, 8:41 a.m. OK GNU C++11 TESTS 119 31 0 1400
57122562 vjudge5 B July 16, 2019, 2:15 a.m. OK GNU C++11 TESTS 119 31 0 1400
57121390 vjudge2 B July 16, 2019, 1:24 a.m. OK GNU C++11 TESTS 119 31 0 1400
48509652 Alohomora B Jan. 17, 2019, 7:52 p.m. OK GNU C++14 TESTS 119 30 102400 1400
48554740 marco200008 B Jan. 19, 2019, 4:38 a.m. OK GNU C++14 TESTS 119 30 307200 1400
54573053 TheStrange B May 24, 2019, 8:42 p.m. OK GNU C++14 TESTS 119 30 307200 1400
48198974 juanigsrz B Jan. 11, 2019, 3:19 a.m. OK GNU C++14 TESTS 119 30 409600 1400
48162669 shojmoj B Jan. 9, 2019, 8:35 p.m. OK GNU C++14 TESTS 119 30 614400 1400
48181198 rajdeepcf B Jan. 10, 2019, 12:36 p.m. OK GNU C++14 TESTS 119 30 614400 1400
48181575 Muhammad98 B Jan. 10, 2019, 12:48 p.m. OK GNU C++14 TESTS 119 30 716800 1400
48171767 n0__one B Jan. 10, 2019, 7:10 a.m. OK GNU C++14 TESTS 119 30 1228800 1400
57016046 Filip03 B July 14, 2019, 11:40 a.m. OK GNU C++14 TESTS 119 31 0 1400
59702602 ironfist_21 B Aug. 30, 2019, 11:19 a.m. OK GNU C++14 TESTS 119 31 0 1400
49997052 mlxiangguo B Feb. 16, 2019, 3:27 p.m. OK GNU C++17 TESTS 119 30 102400 1400
52356085 alif_cse_ju B April 5, 2019, 4:54 p.m. OK GNU C++17 TESTS 119 30 307200 1400
49323543 Dup4 B Feb. 1, 2019, 1:15 p.m. OK GNU C++17 TESTS 119 30 307200 1400
48271343 _07 B Jan. 12, 2019, 2:23 a.m. OK GNU C++17 TESTS 119 30 614400 1400
48452695 Ghotfall B Jan. 16, 2019, 11:22 a.m. OK GNU C++17 TESTS 119 30 614400 1400
48467384 bluishgreen B Jan. 16, 2019, 6 p.m. OK GNU C++17 TESTS 119 30 716800 1400
48188599 pUn1sHeR B Jan. 10, 2019, 4:31 p.m. OK GNU C++17 TESTS 119 30 819200 1400
48179922 im0qianqian B Jan. 10, 2019, 11:55 a.m. OK GNU C++17 TESTS 119 30 2048000 1400
62049964 vjudge5 B Oct. 7, 2019, 9:09 a.m. OK GNU C++17 TESTS 119 31 0 1400
55546027 fdironia B June 14, 2019, 2:43 a.m. OK GNU C++17 TESTS 119 31 0 1400
48175563 ledinhbao B Jan. 10, 2019, 9:22 a.m. OK Go TESTS 119 61 27648000 1400
48166244 2008061626 B Jan. 10, 2019, 1:36 a.m. OK Go TESTS 119 62 0 1400
48719938 chenyung B Jan. 22, 2019, 1:05 p.m. OK Haskell TESTS 119 46 8499200 1400
48717989 chenyung B Jan. 22, 2019, 12:15 p.m. OK Haskell TESTS 119 46 8499200 1400
48178368 KharYusuf B Jan. 10, 2019, 11:02 a.m. OK Java 8 TESTS 119 109 0 1400
69250915 Bhavya_Arora B Jan. 21, 2020, 2:14 p.m. OK Java 8 TESTS 119 124 0 1400
61017974 mufaddalnaya B Sept. 21, 2019, 1:51 p.m. OK Java 8 TESTS 119 124 0 1400
59966318 svr8 B Sept. 3, 2019, 8:44 p.m. OK Java 8 TESTS 119 124 0 1400
52887935 GiantTornado B April 17, 2019, 6:26 a.m. OK Java 8 TESTS 119 124 0 1400
51264395 sn1pejkeee B March 13, 2019, 2:50 p.m. OK Java 8 TESTS 119 124 0 1400
51247049 icpc_loser B March 13, 2019, 6:02 a.m. OK Java 8 TESTS 119 124 0 1400
49059389 3rx B Jan. 27, 2019, 2:45 p.m. OK Java 8 TESTS 119 124 0 1400
48721894 Ziax B Jan. 22, 2019, 1:53 p.m. OK Java 8 TESTS 119 124 0 1400
48531317 codeveloppy B Jan. 18, 2019, 12:03 p.m. OK Java 8 TESTS 119 124 0 1400
48189481 _FariD_ B Jan. 10, 2019, 5 p.m. OK JavaScript TESTS 119 717 3174400 1400
57873144 stepanovep B July 28, 2019, 3:21 a.m. OK Kotlin TESTS 119 171 1126400 1400
53679923 Farwent B May 2, 2019, 6:26 p.m. OK Kotlin TESTS 119 202 307200 1400
48471232 z39 B Jan. 16, 2019, 8:32 p.m. OK Kotlin TESTS 119 233 204800 1400
48267637 n.a.borisov B Jan. 11, 2019, 9:34 p.m. OK Mono C# TESTS 119 62 512000 1400
53689730 treasuryonly B May 3, 2019, 3:52 a.m. OK Mono C# TESTS 119 62 921600 1400
51350362 Mosyagin B March 15, 2019, 9:20 p.m. OK Mono C# TESTS 119 62 1024000 1400
55486522 og.kostya B June 12, 2019, 8:08 a.m. OK Mono C# TESTS 119 62 3891200 1400
49946838 Xtreemist B Feb. 15, 2019, 12:26 p.m. OK Mono C# TESTS 119 62 101068800 1400
48168544 ken_love_rin B Jan. 10, 2019, 4:27 a.m. OK Mono C# TESTS 119 77 819200 1400
48350685 DiegoCO B Jan. 13, 2019, 3:55 p.m. OK Mono C# TESTS 119 77 4198400 1400
48527555 sanek_2bas B Jan. 18, 2019, 9:49 a.m. OK Mono C# TESTS 119 77 4403200 1400
48179307 swamicoder B Jan. 10, 2019, 11:37 a.m. OK Mono C# TESTS 119 77 4505600 1400
50647449 NEvOl B March 1, 2019, 4:15 p.m. OK Mono C# TESTS 119 77 4608000 1400
48170270 Algwang B Jan. 10, 2019, 6:19 a.m. OK MS C++ TESTS 119 31 0 1400
68385517 vjudge3 B Jan. 8, 2020, 5:37 a.m. OK MS C++ TESTS 119 31 102400 1400
50422743 vjudge3 B Feb. 24, 2019, 9:55 a.m. OK MS C++ TESTS 119 31 102400 1400
57944197 vjudge1 B July 29, 2019, 1:41 p.m. OK MS C++ TESTS 119 31 102400 1400
50554603 wjfwjfwjf B Feb. 27, 2019, 7:10 a.m. OK MS C++ TESTS 119 31 102400 1400
50710953 blgpm B March 3, 2019, 6:49 a.m. OK MS C++ TESTS 119 31 102400 1400
52635710 vjudge3 B April 12, 2019, 9:53 a.m. OK MS C++ TESTS 119 31 102400 1400
53213740 vjudge3 B April 24, 2019, 7:21 a.m. OK MS C++ TESTS 119 31 102400 1400
54590838 vjudge2 B May 25, 2019, 8:37 a.m. OK MS C++ TESTS 119 31 102400 1400
57121440 vjudge2 B July 16, 2019, 1:26 a.m. OK MS C++ TESTS 119 31 102400 1400
50163511 GordeyZhizhin B Feb. 19, 2019, 1:39 p.m. OK MS C++ 2017 TESTS 119 31 0 1400
58083023 pmitkov B July 31, 2019, 2:31 p.m. OK MS C++ 2017 TESTS 119 31 102400 1400
50624092 BLACK55 B March 1, 2019, 4:36 a.m. OK MS C++ 2017 TESTS 119 31 102400 1400
50057860 von6yka B Feb. 17, 2019, 11:16 a.m. OK MS C++ 2017 TESTS 119 31 102400 1400
58253542 HelloWorld1024 Yanhui Cuc-center B Aug. 4, 2019, 8:57 a.m. OK MS C++ 2017 TESTS 119 31 102400 1400
49519790 Souseisaki B Feb. 6, 2019, 7 a.m. OK MS C++ 2017 TESTS 119 31 102400 1400
63025555 Ekrte B Oct. 20, 2019, 4:08 p.m. OK MS C++ 2017 TESTS 119 31 102400 1400
49661798 booby B Feb. 9, 2019, 12:44 p.m. OK MS C++ 2017 TESTS 119 31 102400 1400
53806546 petko_mitkov B May 6, 2019, 1:37 a.m. OK MS C++ 2017 TESTS 119 31 204800 1400
54712474 Tattle_ta B May 27, 2019, 11:15 a.m. OK MS C++ 2017 TESTS 119 31 204800 1400
48161198 ky4eronline B Jan. 9, 2019, 7:42 p.m. OK PascalABC.NET TESTS 119 342 307200 1400
51659341 mm944 B March 22, 2019, 1:09 a.m. OK PascalABC.NET TESTS 119 576 102400 1400
48160766 mayakin B Jan. 9, 2019, 7:26 p.m. OK PHP TESTS 119 46 409600 1400
48176420 katalama B Jan. 10, 2019, 9:53 a.m. OK PHP TESTS 119 46 3788800 1400
48184457 godmar B Jan. 10, 2019, 2:15 p.m. OK PyPy 2 TESTS 119 140 2048000 1400
48445703 vjudge1 B Jan. 16, 2019, 7:21 a.m. OK PyPy 2 TESTS 119 140 2867200 1400
48445697 h_mt B Jan. 16, 2019, 7:20 a.m. OK PyPy 2 TESTS 119 140 2867200 1400
50352524 potatomat0 B Feb. 23, 2019, 9:11 a.m. OK PyPy 2 TESTS 119 202 2457600 1400
48166808 c1729 B Jan. 10, 2019, 2:25 a.m. OK PyPy 2 TESTS 119 218 3072000 1400
48166845 IndianSnakeCharmer B Jan. 10, 2019, 2:28 a.m. OK PyPy 2 TESTS 119 218 3072000 1400
48183930 noob77777 B Jan. 10, 2019, 2 p.m. OK PyPy 2 TESTS 119 249 2150400 1400
48168968 anshuman16423 B Jan. 10, 2019, 4:52 a.m. OK PyPy 2 TESTS 119 358 3379200 1400
61554025 kopok2 B Sept. 30, 2019, 1:27 p.m. OK PyPy 3 TESTS 119 140 2969600 1400
51450089 yfo B March 18, 2019, 2:18 p.m. OK PyPy 3 TESTS 119 155 1228800 1400
48273301 tiantian5 B Jan. 12, 2019, 4:05 a.m. OK PyPy 3 TESTS 119 155 2764800 1400
48194015 bartek.brzoza B Jan. 10, 2019, 7:58 p.m. OK PyPy 3 TESTS 119 156 1433600 1400
48157120 yellowflash B Jan. 9, 2019, 5:40 p.m. OK PyPy 3 TESTS 119 156 2457600 1400
48191069 indianfootball B Jan. 10, 2019, 5:55 p.m. OK PyPy 3 TESTS 119 156 2969600 1400
48181538 lollihunter B Jan. 10, 2019, 12:47 p.m. OK PyPy 3 TESTS 119 170 3174400 1400
51277036 knight-erraunt B March 13, 2019, 10:36 p.m. OK PyPy 3 TESTS 119 171 1433600 1400
48529272 saglam.muzaffer B Jan. 18, 2019, 10:51 a.m. OK PyPy 3 TESTS 119 171 2662400 1400
48156775 ploffer11 B Jan. 9, 2019, 5:31 p.m. OK PyPy 3 TESTS 119 171 2867200 1400
48580819 guyshe B Jan. 19, 2019, 4:34 p.m. OK Python 2 TESTS 119 186 716800 1400
48367055 nealzane B Jan. 13, 2019, 11:38 p.m. OK Python 2 TESTS 119 186 1024000 1400
48158346 biltharesatyendra B Jan. 9, 2019, 6:13 p.m. OK Python 2 TESTS 119 187 716800 1400
48164278 scambret B Jan. 9, 2019, 10:16 p.m. OK Python 2 TESTS 119 187 819200 1400
52524187 allonsy_kim B April 9, 2019, 10:37 a.m. OK Python 2 TESTS 119 187 1126400 1400
48202985 SoSooding B Jan. 11, 2019, 6:57 a.m. OK Python 2 TESTS 119 202 819200 1400
48402747 plu9in B Jan. 14, 2019, 11:30 p.m. OK Python 2 TESTS 119 202 6144000 1400
48722788 gatsko B Jan. 22, 2019, 2:15 p.m. OK Python 2 TESTS 119 234 921600 1400
48180052 0xVikas B Jan. 10, 2019, 11:59 a.m. OK Python 2 TESTS 119 1450 409600 1400
48193356 whatshisbucket B Jan. 10, 2019, 7:24 p.m. OK Python 3 TESTS 119 109 716800 1400
48796597 karth2512 B Jan. 23, 2019, 12:53 p.m. OK Python 3 TESTS 119 109 819200 1400
48183859 hrustim25 B Jan. 10, 2019, 1:57 p.m. OK Python 3 TESTS 119 109 819200 1400
49899011 bestzx55 B Feb. 14, 2019, 8:22 a.m. OK Python 3 TESTS 119 109 1024000 1400
48369680 saku7 B Jan. 14, 2019, 2:59 a.m. OK Python 3 TESTS 119 109 1024000 1400
59698849 user_0001 B Aug. 30, 2019, 9:45 a.m. OK Python 3 TESTS 119 124 819200 1400
48587027 soressence B Jan. 19, 2019, 8:33 p.m. OK Python 3 TESTS 119 124 819200 1400
67496890 tushartyagi8750 B Dec. 23, 2019, 11:56 p.m. OK Python 3 TESTS 119 124 921600 1400
49690841 iamssk B Feb. 10, 2019, 11:06 a.m. OK Python 3 TESTS 119 124 921600 1400
48503445 elver_galarga02 B Jan. 17, 2019, 4:23 p.m. OK Python 3 TESTS 119 124 921600 1400
48173466 Jumnast B Jan. 10, 2019, 8:11 a.m. OK Ruby TESTS 119 62 409600 1400
48376944 corvvs_ B Jan. 14, 2019, 8:10 a.m. OK Ruby TESTS 119 93 307200 1400
48161643 Bassel B Jan. 9, 2019, 7:58 p.m. OK Rust TESTS 119 31 102400 1400
48187761 yakamoto B Jan. 10, 2019, 4:05 p.m. OK Scala TESTS 119 529 307200 1400
49149011 mikkk B Jan. 29, 2019, 11:56 a.m. OK Scala TESTS 119 592 307200 1400
48511358 hot_yoghurt B Jan. 17, 2019, 9:35 p.m. OK Scala TESTS 119 592 819200 1400

remove filters

Back to search problems