Codeforces Round 631 (Div. 1) - Thanks, Denis aramis Shitov!

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
1329 Codeforces Round 631 (Div. 1) - Thanks, Denis aramis Shitov! FINISHED False 7200 151428311 April 3, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9217 ) A Dreamoon Likes Coloring PROGRAMMING constructive algorithms greedy implementation math 1800

B'Dreamoon likes coloring cells very much. There is a row of n cells. Initially, all cells are empty (don 't contain any color). Cells are numbered from 1 to n . You are given an integer m and m integers l_1, l_2, ldots, l_m ( 1 <= l_i <= n ) Dreamoon will perform m operations. In i -th operation, Dreamoon will choose a number p_i from range [1, n-l_i+1] (inclusive) and will paint all cells from p_i to p_i+l_i-1 (inclusive) in i -th color. Note that cells may be colored more one than once, in this case, cell will have the color from the latest operation. Dreamoon hopes that after these m operations, all colors will appear at least once and all cells will be colored. Please help Dreamoon to choose p_i in each operation to satisfy all constraints. The first line contains two integers n,m ( 1 <= q m <= q n <= q 100 ,000 ). The second line contains m integers l_1, l_2, ldots, l_m ( 1 <= q l_i <= q n ). If it 's impossible to perform m operations to satisfy all constraints, print " '-1" (without quotes). Otherwise, print m integers p_1, p_2, ldots, p_m ( 1 <= q p_i <= q n - l_i + 1 ), after these m operations, all colors should appear at least once and all cells should be colored. If there are several possible solutions, you can print any. '...

Tutorials

Codeforces Round #631 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
75644755 a_natural A April 6, 2020, 10:14 a.m. OK Clang++17 Diagnostics TESTS 53 109 409600 1800
75388189 Gassa A April 3, 2020, 3:38 p.m. OK D TESTS 52 62 4198400 1800
75361515 iica A April 3, 2020, 2:49 p.m. OK D TESTS 52 78 24371200 1800
75369643 hos.lyric A April 3, 2020, 3:02 p.m. OK D TESTS 52 93 13516800 1800
75363539 pengin_2000 A April 3, 2020, 2:52 p.m. OK GNU C11 TESTS 52 374 1638400 1800
75418079 physics0523 A April 3, 2020, 5:36 p.m. OK GNU C11 TESTS 52 670 8396800 1800
75446871 pufanyi A April 4, 2020, 1:39 a.m. OK GNU C++11 TESTS 53 31 1843200 1800
75359334 FizzyDavid A April 3, 2020, 2:46 p.m. OK GNU C++11 TESTS 52 31 2560000 1800
75377741 s_r_f A April 3, 2020, 3:17 p.m. OK GNU C++11 TESTS 52 31 2867200 1800
75370085 ouuan A April 3, 2020, 3:03 p.m. OK GNU C++11 TESTS 52 31 3174400 1800
75638158 _zay A April 6, 2020, 8:36 a.m. OK GNU C++11 TESTS 53 31 3584000 1800
75358927 nehnait A April 3, 2020, 2:46 p.m. OK GNU C++11 TESTS 52 31 5017600 1800
75372384 Binary_Search_Tree A April 3, 2020, 3:07 p.m. OK GNU C++11 TESTS 52 31 7987200 1800
75704943 Binary_Search_Tree A April 7, 2020, 1:40 a.m. OK GNU C++11 TESTS 53 31 7987200 1800
75360655 command_block A April 3, 2020, 2:48 p.m. OK GNU C++11 TESTS 52 46 204800 1800
75370229 chasedeath A April 3, 2020, 3:03 p.m. OK GNU C++11 TESTS 52 46 409600 1800
75375867 NotaMotuaQAQ A April 3, 2020, 3:13 p.m. OK GNU C++14 TESTS 52 31 6246400 1800
75385422 bansals888 A April 3, 2020, 3:32 p.m. OK GNU C++14 TESTS 52 46 819200 1800
75615883 wucstdio A April 6, 2020, 1:22 a.m. OK GNU C++14 TESTS 53 46 819200 1800
75537245 lzqwq A April 5, 2020, 5:55 a.m. OK GNU C++14 TESTS 53 46 819200 1800
75366528 jam1729 A April 3, 2020, 2:57 p.m. OK GNU C++14 TESTS 52 46 1228800 1800
76058586 Gui_thin A April 10, 2020, 5:51 a.m. OK GNU C++14 TESTS 53 46 1945600 1800
76307666 avtobus A April 12, 2020, 8:56 a.m. OK GNU C++14 TESTS 53 61 409600 1800
75723537 yss915 A April 7, 2020, 8:01 a.m. OK GNU C++14 TESTS 53 61 409600 1800
75454191 chhokmah A April 4, 2020, 4:58 a.m. OK GNU C++14 TESTS 53 61 409600 1800
75562580 nikolapesic2802 A April 5, 2020, 11:26 a.m. OK GNU C++14 TESTS 53 61 819200 1800
75371442 ha15 A April 3, 2020, 3:05 p.m. OK GNU C++17 TESTS 52 46 819200 1800
75449914 Rahul_cpp A April 4, 2020, 3:11 a.m. OK GNU C++17 TESTS 53 46 819200 1800
75364710 dmkozyrev A April 3, 2020, 2:54 p.m. OK GNU C++17 TESTS 52 46 819200 1800
75362490 kongroo A April 3, 2020, 2:51 p.m. OK GNU C++17 TESTS 52 46 819200 1800
75359594 Egor A April 3, 2020, 2:47 p.m. OK GNU C++17 TESTS 52 46 819200 1800
75366536 Aleks5d A April 3, 2020, 2:57 p.m. OK GNU C++17 TESTS 52 46 921600 1800
75363253 wery0 A April 3, 2020, 2:52 p.m. OK GNU C++17 TESTS 52 46 1228800 1800
75356950 HatsuneMikuo A April 3, 2020, 2:43 p.m. OK GNU C++17 TESTS 52 46 2150400 1800
75479640 interestingLSY A April 4, 2020, 11:16 a.m. OK GNU C++17 TESTS 53 46 2150400 1800
75359992 JOHNKRAM A April 3, 2020, 2:47 p.m. OK GNU C++17 TESTS 52 46 3276800 1800
75581620 .tx A April 5, 2020, 3:03 p.m. OK GNU C++17 (64) TESTS 53 31 819200 1800
75362478 IgorSmirnov A April 3, 2020, 2:51 p.m. OK GNU C++17 (64) TESTS 52 31 1638400 1800
75421794 Alphagocc A April 3, 2020, 6:01 p.m. OK GNU C++17 (64) TESTS 52 31 3584000 1800
75472026 DeadInsideOnTest993 A April 4, 2020, 9:33 a.m. OK GNU C++17 (64) TESTS 53 46 819200 1800
76270652 tyler A April 11, 2020, 10:26 p.m. OK GNU C++17 (64) TESTS 53 46 819200 1800
76050556 zjsdut A April 10, 2020, 2:53 a.m. OK GNU C++17 (64) TESTS 53 46 819200 1800
75649677 conquizztador A April 6, 2020, 11:18 a.m. OK GNU C++17 (64) TESTS 53 46 819200 1800
75431454 Mohammad_Yasser A April 3, 2020, 7:38 p.m. OK GNU C++17 (64) TESTS 53 46 819200 1800
75365828 shurongwang A April 3, 2020, 2:56 p.m. OK GNU C++17 (64) TESTS 52 46 819200 1800
75357362 ecnerwala A April 3, 2020, 2:44 p.m. OK GNU C++17 (64) TESTS 52 46 819200 1800
75361984 Lewin A April 3, 2020, 2:50 p.m. OK Java 11 TESTS 52 187 0 1800
75375537 wackloner A April 3, 2020, 3:13 p.m. OK Java 11 TESTS 52 217 0 1800
75365653 uwi A April 3, 2020, 2:56 p.m. OK Java 11 TESTS 52 218 0 1800
75380521 sarthakmanna A April 3, 2020, 3:22 p.m. OK Java 11 TESTS 52 218 10137600 1800
75361878 mikit A April 3, 2020, 2:50 p.m. OK Java 11 TESTS 52 233 0 1800
75448568 happy15 A April 4, 2020, 2:33 a.m. OK Java 11 TESTS 53 233 0 1800
75370443 Musin A April 3, 2020, 3:04 p.m. OK Java 11 TESTS 52 233 0 1800
75363650 Suzukaze A April 3, 2020, 2:52 p.m. OK Java 11 TESTS 52 249 0 1800
75777117 rs9 A April 7, 2020, 6:41 p.m. OK Java 11 TESTS 53 966 0 1800
75458325 StayAwayFromBitches A April 4, 2020, 6:13 a.m. OK Java 8 TESTS 53 124 0 1800
75601154 spar5h A April 5, 2020, 7:13 p.m. OK Java 8 TESTS 53 140 0 1800
75419288 qlf9 A April 3, 2020, 5:43 p.m. OK Java 8 TESTS 52 140 0 1800
75365688 Jeel_Vaishnav A April 3, 2020, 2:56 p.m. OK Java 8 TESTS 52 140 0 1800
75358003 cwise A April 3, 2020, 2:45 p.m. OK Java 8 TESTS 52 140 20172800 1800
75378137 Xylenox A April 3, 2020, 3:18 p.m. OK Java 8 TESTS 52 155 0 1800
75598024 Hemose A April 5, 2020, 6:31 p.m. OK Java 8 TESTS 53 155 0 1800
75522186 lazypanda A April 4, 2020, 9:40 p.m. OK Java 8 TESTS 53 155 0 1800
75410190 Kenb A April 3, 2020, 4:27 p.m. OK Java 8 TESTS 52 155 0 1800
75384859 KharYusuf A April 3, 2020, 3:31 p.m. OK Java 8 TESTS 52 155 0 1800
75362628 Tlatoani A April 3, 2020, 2:51 p.m. OK Kotlin TESTS 52 186 2048000 1800
75384999 Hakiobo A April 3, 2020, 3:32 p.m. OK Kotlin TESTS 52 202 4300800 1800
75441154 darnley A April 3, 2020, 10:31 p.m. OK Kotlin TESTS 53 249 4608000 1800
75417827 knightL A April 3, 2020, 5:35 p.m. OK Kotlin TESTS 52 249 5222400 1800
75406754 darnley A April 3, 2020, 4:19 p.m. OK Kotlin TESTS 52 265 3993600 1800
75360315 keymoon A April 3, 2020, 2:48 p.m. OK Mono C# TESTS 52 124 18739200 1800
75360755 lxhgww A April 3, 2020, 2:48 p.m. OK MS C++ TESTS 52 61 819200 1800
75362646 math957963 A April 3, 2020, 2:51 p.m. OK MS C++ TESTS 52 62 3174400 1800
75397205 tarattata1 A April 3, 2020, 3:57 p.m. OK MS C++ TESTS 52 78 3584000 1800
75986959 vjudge5 A April 9, 2020, noon OK MS C++ TESTS 53 109 3174400 1800
75820397 xushibo A April 8, 2020, 9:47 a.m. OK MS C++ 2017 TESTS 53 78 819200 1800
75355825 pichulia A April 3, 2020, 2:42 p.m. OK MS C++ 2017 TESTS 52 78 819200 1800
75365696 vpike A April 3, 2020, 2:56 p.m. OK MS C++ 2017 TESTS 52 109 819200 1800
75970464 xyou A April 9, 2020, 8:51 a.m. OK MS C++ 2017 TESTS 53 140 819200 1800
75364310 danilgrig A April 3, 2020, 2:53 p.m. OK MS C++ 2017 TESTS 52 140 1945600 1800
75367566 CrashMaster A April 3, 2020, 2:59 p.m. OK MS C++ 2017 TESTS 52 155 1228800 1800
75576395 itskamee A April 5, 2020, 2:06 p.m. OK MS C++ 2017 TESTS 53 155 4505600 1800
75365434 Dangl A April 3, 2020, 2:55 p.m. OK MS C++ 2017 TESTS 52 156 1638400 1800
75576310 havelpaf A April 5, 2020, 2:05 p.m. OK MS C++ 2017 TESTS 53 156 4505600 1800
75544248 nik1998 A April 5, 2020, 7:33 a.m. OK MS C++ 2017 TESTS 53 156 5017600 1800
75359405 astrom.lars A April 3, 2020, 2:46 p.m. OK PyPy 2 TESTS 52 155 10137600 1800
75360509 bcollet A April 3, 2020, 2:48 p.m. OK PyPy 2 TESTS 52 171 9523200 1800
75368062 nagiss A April 3, 2020, 3 p.m. OK PyPy 3 TESTS 52 248 13312000 1800
75380064 addammy A April 3, 2020, 3:21 p.m. OK PyPy 3 TESTS 52 249 13209600 1800
75397590 fanfly A April 3, 2020, 3:58 p.m. OK PyPy 3 TESTS 52 249 16076800 1800
75707670 yejung1234 A April 7, 2020, 3:08 a.m. OK PyPy 3 TESTS 53 264 12083200 1800
75391765 baolidakai A April 3, 2020, 3:46 p.m. OK PyPy 3 TESTS 52 264 12902400 1800
75932844 Yash23 A April 8, 2020, 9:33 p.m. OK PyPy 3 TESTS 53 264 13721600 1800
75442260 darklordx A April 3, 2020, 11 p.m. OK PyPy 3 TESTS 53 265 11776000 1800
75432935 Kishen19 A April 3, 2020, 7:58 p.m. OK PyPy 3 TESTS 53 265 13926400 1800
75936675 Kenig A April 8, 2020, 11:09 p.m. OK PyPy 3 TESTS 53 265 15257600 1800
75358967 tamato A April 3, 2020, 2:46 p.m. OK PyPy 3 TESTS 52 280 11161600 1800
75362904 nwi A April 3, 2020, 2:51 p.m. OK Python 2 TESTS 52 249 5632000 1800
75786508 roflmoqkz A April 7, 2020, 9:09 p.m. OK Python 3 TESTS 53 234 7168000 1800
75551252 Ryanjoo18 A April 5, 2020, 9:06 a.m. OK Python 3 TESTS 53 296 7577600 1800
75708203 Gamapro A April 7, 2020, 3:22 a.m. OK Python 3 TESTS 53 296 7884800 1800
75551232 lopol A April 5, 2020, 9:05 a.m. OK Python 3 TESTS 53 312 7372800 1800
75658195 formidable_piedpiper A April 6, 2020, 1 p.m. OK Python 3 TESTS 53 327 7577600 1800
75454205 Eshan_19 A April 4, 2020, 4:58 a.m. OK Python 3 TESTS 53 327 7577600 1800
75374033 derbaer A April 3, 2020, 3:10 p.m. OK Python 3 TESTS 52 327 9932800 1800
75534225 yzrh A April 5, 2020, 4:55 a.m. OK Python 3 TESTS 53 343 6758400 1800
75932254 gdoritos A April 8, 2020, 9:22 p.m. OK Rust TESTS 53 46 4608000 1800

remove filters

Back to search problems