Codeforces Round 601 (Div. 1)

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
1254 Codeforces Round 601 (Div. 1) FINISHED False 7200 163265087 Nov. 19, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4726 ) B1 Send Boxes to Alice (Easy Version) PROGRAMMING constructive algorithms greedy math number theory ternary search two pointers 2000

B"This is the easier version of the problem. In this version, 1 <= n <= 10^5 and 0 <= a_i <= 1 . You can hack this problem only if you solve and lock both problems. Christmas is coming, and our protagonist, Bob, is preparing a spectacular present for his long-time best friend Alice. This year, he decides to prepare n boxes of chocolate, numbered from 1 to n . Initially, the i -th box contains a_i chocolate pieces. Since Bob is a typical nice guy, he will not send Alice n empty boxes. In other words, at least one of a_1, a_2, ldots, a_n is positive. Since Alice dislikes coprime sets, she will be happy only if there exists some integer k > 1 such that the number of pieces in each box is divisible by k . Note that Alice won't mind if there exists some empty boxes. Charlie, Alice's boyfriend, also is Bob's second best friend, so he decides to help Bob by rearranging the chocolate pieces. In one second, Charlie can pick up a piece in box i and put it into either box i-1 or box i+1 (if such boxes exist). Of course, he wants to help his friend as quickly as possible. Therefore, he asks you to calculate the minimum number of seconds he would need to make Alice happy. The first line contains a single integer n ( 1 <= n <= 10^5 ) -- the number of chocolate boxes. The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= 1 ) -- the number of chocolate pieces in the i -th box. It is guaranteed that at least one of a_1, a_2, ldots, a_n is positive. If there is no way for Charlie to make Alice happy, print -1 . Otherwise, print a single integer x -- the minimum number of seconds for Charlie to help Bob make Alice happy. "...

Tutorials

Codeforces Round #601 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
65354733 hos.lyric B1 Nov. 19, 2019, 2:42 p.m. OK D TESTS 68 46 4198400 2000
65368341 Gassa B1 Nov. 19, 2019, 3:21 p.m. OK D TESTS 68 46 4198400 2000
65371887 iica B1 Nov. 19, 2019, 3:33 p.m. OK D TESTS 68 155 4300800 2000
65766812 LaSWeeG B1 Nov. 26, 2019, 6:21 p.m. OK FPC TESTS 68 233 24064000 2000
65364527 physics0523 B1 Nov. 19, 2019, 3:09 p.m. OK GNU C11 TESTS 68 108 16793600 2000
65470054 Rivaille_Ackerman B1 Nov. 21, 2019, 8 a.m. OK GNU C++11 TESTS 68 31 409600 2000
69276189 Flamire B1 Jan. 22, 2020, 2:18 a.m. OK GNU C++11 TESTS 68 31 614400 2000
65377549 Dilute B1 Nov. 19, 2019, 3:55 p.m. OK GNU C++11 TESTS 68 31 819200 2000
65434406 Youngsc B1 Nov. 20, 2019, 12:58 p.m. OK GNU C++11 TESTS 68 31 819200 2000
65361705 LJC00118 B1 Nov. 19, 2019, 3:01 p.m. OK GNU C++11 TESTS 68 31 1228800 2000
67997616 Alan_zhou B1 Dec. 31, 2019, 9:03 a.m. OK GNU C++11 TESTS 68 31 2457600 2000
69557362 luogu_bot5 B1 Jan. 26, 2020, 9:20 a.m. OK GNU C++11 TESTS 68 31 2457600 2000
65821856 jiaangk_ B1 Nov. 27, 2019, 10:55 a.m. OK GNU C++11 TESTS 68 31 3993600 2000
65357743 1919810 B1 Nov. 19, 2019, 2:50 p.m. OK GNU C++11 TESTS 68 31 3993600 2000
66500480 Rubblsh12345 B1 Dec. 8, 2019, 12:20 p.m. OK GNU C++11 TESTS 68 31 3993600 2000
65546676 Linkus B1 Nov. 22, 2019, 5:22 p.m. OK GNU C++14 TESTS 68 31 1433600 2000
65361927 liouzhou_101 B1 Nov. 19, 2019, 3:02 p.m. OK GNU C++14 TESTS 68 31 11161600 2000
65376979 yudedako B1 Nov. 19, 2019, 3:52 p.m. OK GNU C++14 TESTS 68 46 409600 2000
66157292 ACRush B1 Dec. 2, 2019, 12:23 a.m. OK GNU C++14 TESTS 68 46 409600 2000
65412018 heyuhhh B1 Nov. 20, 2019, 4:52 a.m. OK GNU C++14 TESTS 68 46 409600 2000
65394153 TwoFx B1 Nov. 19, 2019, 6:25 p.m. OK GNU C++14 TESTS 68 46 819200 2000
65410475 jiangly B1 Nov. 20, 2019, 3:49 a.m. OK GNU C++14 TESTS 68 46 819200 2000
66241095 shehebe B1 Dec. 3, 2019, 6:11 p.m. OK GNU C++14 TESTS 68 46 819200 2000
65394459 TwoFx B1 Nov. 19, 2019, 6:31 p.m. OK GNU C++14 TESTS 68 46 819200 2000
66645765 killer_khan B1 Dec. 11, 2019, 4:39 p.m. OK GNU C++14 TESTS 68 46 819200 2000
65398200 Anish1712 B1 Nov. 19, 2019, 8:09 p.m. OK GNU C++17 TESTS 68 46 409600 2000
65375588 potoooooooo B1 Nov. 19, 2019, 3:46 p.m. OK GNU C++17 TESTS 68 46 409600 2000
65364820 neckbotov B1 Nov. 19, 2019, 3:10 p.m. OK GNU C++17 TESTS 68 46 409600 2000
65364548 Kaban-5 B1 Nov. 19, 2019, 3:09 p.m. OK GNU C++17 TESTS 68 46 409600 2000
65361609 AndreySergunin B1 Nov. 19, 2019, 3:01 p.m. OK GNU C++17 TESTS 68 46 409600 2000
65410813 hi_allerria B1 Nov. 20, 2019, 4:04 a.m. OK GNU C++17 TESTS 68 46 409600 2000
66646618 Ronnie007 B1 Dec. 11, 2019, 5:01 p.m. OK GNU C++17 TESTS 68 46 409600 2000
66160622 Scissors_Ss B1 Dec. 2, 2019, 4:07 a.m. OK GNU C++17 TESTS 68 46 409600 2000
66086858 Scissors_Ss B1 Dec. 1, 2019, 5:21 a.m. OK GNU C++17 TESTS 68 46 409600 2000
65419183 dimas.kovas B1 Nov. 20, 2019, 8:16 a.m. OK GNU C++17 TESTS 68 46 409600 2000
65400653 Kharouba B1 Nov. 19, 2019, 9:49 p.m. OK Java 11 TESTS 68 187 0 2000
65366904 Kharouba B1 Nov. 19, 2019, 3:16 p.m. OK Java 11 TESTS 68 217 0 2000
65366843 Musin B1 Nov. 19, 2019, 3:16 p.m. OK Java 11 TESTS 68 280 0 2000
65368608 TheRaven B1 Nov. 19, 2019, 3:22 p.m. OK Java 8 TESTS 68 124 0 2000
65750519 aminul B1 Nov. 26, 2019, 1:52 p.m. OK Java 8 TESTS 68 124 0 2000
65451248 StayAwayFromBitches B1 Nov. 20, 2019, 6:12 p.m. OK Java 8 TESTS 68 124 0 2000
65768397 derrick20 B1 Nov. 26, 2019, 7:09 p.m. OK Java 8 TESTS 68 124 0 2000
65393797 jdurie B1 Nov. 19, 2019, 6:17 p.m. OK Java 8 TESTS 68 140 0 2000
65371505 SergeyMelnikov B1 Nov. 19, 2019, 3:31 p.m. OK Java 8 TESTS 68 140 0 2000
65365531 fetetriste B1 Nov. 19, 2019, 3:12 p.m. OK Java 8 TESTS 68 140 0 2000
67176098 Xylenox B1 Dec. 18, 2019, 7:20 p.m. OK Java 8 TESTS 68 140 0 2000
65451198 StayAwayFromBitches B1 Nov. 20, 2019, 6:11 p.m. OK Java 8 TESTS 68 140 0 2000
65449704 I_love_Harpae B1 Nov. 20, 2019, 5:33 p.m. OK Java 8 TESTS 68 140 0 2000
65402085 Tlatoani B1 Nov. 19, 2019, 11:26 p.m. OK Kotlin TESTS 68 187 512000 2000
65558924 tycyd B1 Nov. 23, 2019, 1:26 a.m. OK Mono C# TESTS 68 109 3891200 2000
65379235 tarattata1 B1 Nov. 19, 2019, 4:01 p.m. OK MS C++ TESTS 68 46 2662400 2000
65380582 Apsara B1 Nov. 19, 2019, 4:06 p.m. OK MS C++ TESTS 68 61 28057600 2000
65376901 r57shell B1 Nov. 19, 2019, 3:52 p.m. OK MS C++ TESTS 68 171 409600 2000
65364452 math957963 B1 Nov. 19, 2019, 3:09 p.m. OK MS C++ TESTS 68 171 2355200 2000
65366972 pichulia B1 Nov. 19, 2019, 3:17 p.m. OK MS C++ 2017 TESTS 68 61 2969600 2000
66568325 SHZhang2 B1 Dec. 10, 2019, 1:35 a.m. OK MS C++ 2017 TESTS 68 61 12083200 2000
65362487 Madball B1 Nov. 19, 2019, 3:03 p.m. OK MS C++ 2017 TESTS 68 62 10342400 2000
65450830 pseuda B1 Nov. 20, 2019, 6:01 p.m. OK MS C++ 2017 TESTS 68 78 1843200 2000
65401508 AlexanderL B1 Nov. 19, 2019, 10:43 p.m. OK MS C++ 2017 TESTS 68 93 409600 2000
65489434 maozaozao B1 Nov. 21, 2019, 2:01 p.m. OK MS C++ 2017 TESTS 68 109 10137600 2000
65368805 re_eVVorld B1 Nov. 19, 2019, 3:23 p.m. OK MS C++ 2017 TESTS 68 156 2457600 2000
65371446 Friska B1 Nov. 19, 2019, 3:31 p.m. OK MS C++ 2017 TESTS 68 171 2457600 2000
65401418 AlexanderL B1 Nov. 19, 2019, 10:36 p.m. OK MS C++ 2017 TESTS 68 249 409600 2000
66932728 Svlad_Cjelli B1 Dec. 15, 2019, 7:46 a.m. OK Ocaml TESTS 68 78 10956800 2000
65766728 LaSWeeG B1 Nov. 26, 2019, 6:19 p.m. OK PascalABC.NET TESTS 68 998 24678400 2000
66021369 yumtam B1 Nov. 30, 2019, 7:27 a.m. OK PyPy 2 TESTS 68 311 8089600 2000
68829937 _SrJSilver_ B1 Jan. 14, 2020, 9:22 p.m. OK PyPy 3 TESTS 68 187 8908800 2000
65378422 titia B1 Nov. 19, 2019, 3:58 p.m. OK PyPy 3 TESTS 68 187 9011200 2000
66671882 sruthi_1729 B1 Dec. 12, 2019, 9:41 a.m. OK PyPy 3 TESTS 68 202 9011200 2000
65370434 Kiri8128 B1 Nov. 19, 2019, 3:28 p.m. OK PyPy 3 TESTS 68 217 7884800 2000
65369655 nagiss B1 Nov. 19, 2019, 3:25 p.m. OK PyPy 3 TESTS 68 233 9830400 2000
65596800 zgonnikov B1 Nov. 23, 2019, 4:13 p.m. OK PyPy 3 TESTS 68 264 8908800 2000
65370588 neterukun B1 Nov. 19, 2019, 3:28 p.m. OK PyPy 3 TESTS 68 280 9625600 2000
65365990 sansen B1 Nov. 19, 2019, 3:14 p.m. OK Rust TESTS 68 62 3174400 2000

remove filters

Back to search problems