Codeforces Round 552 (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
1154 Codeforces Round 552 (Div. 3) FINISHED False 7200 176397899 April 16, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9997 ) D Walking Robot PROGRAMMING greedy 1400

B"There is a robot staying at X=0 on the Ox axis. He has to walk to X=n . You are controlling this robot and controlling how he goes. The robot has a battery and an accumulator with a solar panel. The i -th segment of the path (from X=i-1 to X=i ) can be exposed to sunlight or not. The array s denotes which segments are exposed to sunlight: if segment i is exposed, then s_i = 1 , otherwise s_i = 0 . The robot has one battery of capacity b and one accumulator of capacity a . For each segment, you should choose which type of energy storage robot will use to go to the next point (it can be either battery or accumulator). If the robot goes using the battery, the current charge of the battery is decreased by one (the robot can't use the battery if its charge is zero). And if the robot goes using the accumulator, the current charge of the accumulator is decreased by one (and the robot also can't use the accumulator if its charge is zero). If the current segment is exposed to sunlight and the robot goes through it using the battery, the charge of the accumulator increases by one (of course, its charge can't become higher than it's maximum capacity). If accumulator is used to pass some segment, its charge decreases by 1 no matter if the segment is exposed or not. You understand that it is not always possible to walk to X=n . You want your robot to go as far as possible. Find the maximum number of segments of distance the robot can pass if you control him optimally. The first line of the input contains three integers n, b, a ( 1 <= n, b, a <= 2 cdot 10^5 ) -- the robot's destination point, the battery capacity and the accumulator capacity, respectively. The second line of the input contains n integers s_1, s_2, ... , s_n ( 0 <= s_i <= 1 ), where s_i is 1 if the i -th segment of distance is exposed to sunlight, and 0 otherwise. Print one integ"...

Tutorials

Codeforces Round #552 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
66827693 vjudge1 D Dec. 14, 2019, 9:30 a.m. OK Clang++17 Diagnostics TESTS 50 545 2252800 1400
53726606 shenqihao D May 4, 2019, 4:50 a.m. OK Clang++17 Diagnostics TESTS 50 576 307200 1400
52981392 vas_g D April 18, 2019, 5:26 p.m. OK Delphi TESTS 50 46 307200 1400
56721827 ruban D July 8, 2019, 5:15 p.m. OK Delphi TESTS 50 46 102195200 1400
60388519 luogu_bot3 D Sept. 11, 2019, 12:26 p.m. OK FPC TESTS 50 46 0 1400
67040646 Dbvivi D Dec. 16, 2019, 7:08 p.m. OK FPC TESTS 50 46 0 1400
53036146 PhuongPeu D April 20, 2019, 7:21 a.m. OK FPC TESTS 50 46 921600 1400
62335691 kaiboy D Oct. 11, 2019, 12:52 a.m. OK GNU C11 TESTS 50 46 0 1400
65315875 raresmihai01 D Nov. 18, 2019, 5:16 p.m. OK GNU C11 TESTS 50 46 0 1400
52921017 Naii_the_Baf D April 17, 2019, 5:50 p.m. OK GNU C11 TESTS 50 46 0 1400
53220413 _baalta_ D April 24, 2019, 11:33 a.m. OK GNU C11 TESTS 50 46 0 1400
53267756 Aphelios D April 25, 2019, 3:27 a.m. OK GNU C11 TESTS 50 46 0 1400
53100857 arnob918 D April 21, 2019, 4:22 p.m. OK GNU C11 TESTS 50 46 0 1400
53710497 rainboy D May 3, 2019, 3:22 p.m. OK GNU C11 TESTS 50 46 0 1400
54891164 YouWontKnowMe D May 31, 2019, 8:30 p.m. OK GNU C11 TESTS 50 46 0 1400
62318527 kaiboy D Oct. 10, 2019, 4 p.m. OK GNU C11 TESTS 50 46 0 1400
64706484 Razvan2000f D Nov. 11, 2019, 4:44 p.m. OK GNU C11 TESTS 50 46 819200 1400
53655525 Vxlimo D May 2, 2019, 4:26 a.m. OK GNU C++11 TESTS 50 31 0 1400
53394537 OIerwanhong D April 27, 2019, 8:31 a.m. OK GNU C++11 TESTS 50 31 0 1400
53610186 Vxlimo D May 1, 2019, 12:37 p.m. OK GNU C++11 TESTS 50 31 0 1400
63415421 luogu_bot1 D Oct. 26, 2019, 3:50 a.m. OK GNU C++11 TESTS 50 31 0 1400
55516910 AyoAyowei D June 13, 2019, 5:59 a.m. OK GNU C++11 TESTS 50 31 0 1400
52945010 y2823774827y D April 18, 2019, 11:10 a.m. OK GNU C++11 TESTS 50 31 0 1400
53388841 OIerwanhong D April 27, 2019, 5:50 a.m. OK GNU C++11 TESTS 50 31 0 1400
53820820 BQLAileen D May 6, 2019, 1:03 p.m. OK GNU C++11 TESTS 50 31 204800 1400
55489863 luogu_bot4 D June 12, 2019, 9:37 a.m. OK GNU C++11 TESTS 50 31 204800 1400
65697314 446263020 D Nov. 25, 2019, 8:57 a.m. OK GNU C++11 TESTS 50 31 204800 1400
53660393 bsbs D May 2, 2019, 7:23 a.m. OK GNU C++14 TESTS 50 31 0 1400
63931774 naranja011223 D Oct. 31, 2019, 2:30 p.m. OK GNU C++14 TESTS 50 46 0 1400
67390511 24circles D Dec. 21, 2019, 7:32 p.m. OK GNU C++14 TESTS 50 46 0 1400
66644445 NDKhoa D Dec. 11, 2019, 4:07 p.m. OK GNU C++14 TESTS 50 46 0 1400
64318032 sivx D Nov. 5, 2019, 2:42 p.m. OK GNU C++14 TESTS 50 46 0 1400
64314464 frost_ D Nov. 5, 2019, 1:42 p.m. OK GNU C++14 TESTS 50 46 0 1400
64084110 shifanyiakioi D Nov. 2, 2019, 10:58 a.m. OK GNU C++14 TESTS 50 46 0 1400
63280852 nihal_47 D Oct. 24, 2019, 8:38 a.m. OK GNU C++14 TESTS 50 46 0 1400
60277811 SuperJ6 D Sept. 8, 2019, 6:49 p.m. OK GNU C++14 TESTS 50 46 0 1400
59822075 shubhammishra D Aug. 31, 2019, 5:45 p.m. OK GNU C++14 TESTS 50 46 0 1400
53816591 interestingLSY D May 6, 2019, 10:54 a.m. OK GNU C++17 TESTS 50 15 1024000 1400
53031463 bcku1 D April 20, 2019, 1:05 a.m. OK GNU C++17 TESTS 50 30 1740800 1400
53115681 SharniR D April 22, 2019, 7:48 a.m. OK GNU C++17 TESTS 50 31 0 1400
63897911 shubhsingh0709 D Oct. 31, 2019, 3:23 a.m. OK GNU C++17 TESTS 50 31 307200 1400
69507002 ahzong D Jan. 25, 2020, 9:02 a.m. OK GNU C++17 TESTS 50 31 512000 1400
53816597 HatsuneMikuo D May 6, 2019, 10:54 a.m. OK GNU C++17 TESTS 50 31 1024000 1400
55611068 ReaLNero1 D June 16, 2019, 5:45 a.m. OK GNU C++17 TESTS 50 31 1740800 1400
66661720 vjudge4 D Dec. 12, 2019, 4:57 a.m. OK GNU C++17 TESTS 50 46 0 1400
66735330 kr_abhinav D Dec. 12, 2019, 6:35 p.m. OK GNU C++17 TESTS 50 46 0 1400
67609461 Rahul_cpp D Dec. 25, 2019, 2:49 p.m. OK GNU C++17 TESTS 50 46 0 1400
53030414 cs_office D April 19, 2019, 11:03 p.m. OK Go TESTS 50 46 0 1400
62951833 sighduck D Oct. 19, 2019, 7:04 p.m. OK Go TESTS 50 109 0 1400
53007289 2008061626 D April 19, 2019, 10:13 a.m. OK Go TESTS 50 109 716800 1400
55280614 Russell_Emerine D June 8, 2019, 12:24 a.m. OK Haskell TESTS 50 249 9523200 1400
53009834 Laurens D April 19, 2019, 11:33 a.m. OK Haskell TESTS 50 249 9523200 1400
64108692 bakekaga D Nov. 2, 2019, 5:45 p.m. OK Java 11 TESTS 50 187 0 1400
65733972 mm.devin.wang D Nov. 26, 2019, 6:47 a.m. OK Java 11 TESTS 50 343 0 1400
65732034 ABog2221 D Nov. 26, 2019, 5:40 a.m. OK Java 11 TESTS 50 358 0 1400
57590588 Mann_27__ D July 23, 2019, 12:09 p.m. OK Java 8 TESTS 50 109 0 1400
53211991 Oland D April 24, 2019, 6:10 a.m. OK Java 8 TESTS 50 109 0 1400
53104475 anshh31 D April 21, 2019, 6:45 p.m. OK Java 8 TESTS 50 109 0 1400
52933347 Nothing199 D April 18, 2019, 4:31 a.m. OK Java 8 TESTS 50 109 0 1400
52933254 Nothing199 D April 18, 2019, 4:25 a.m. OK Java 8 TESTS 50 109 0 1400
57771556 darren_yao D July 26, 2019, 1:09 a.m. OK Java 8 TESTS 50 124 0 1400
68809094 ZMaaraki D Jan. 14, 2020, 3:57 p.m. OK Java 8 TESTS 50 124 0 1400
67438094 In_The_Name_Of_Love D Dec. 22, 2019, 6:03 p.m. OK Java 8 TESTS 50 124 0 1400
57458934 qudratulloh D July 21, 2019, 12:46 p.m. OK Java 8 TESTS 50 124 0 1400
56764830 Garett D July 9, 2019, 5:43 p.m. OK Java 8 TESTS 50 124 0 1400
69282143 vjudge4 D Jan. 22, 2020, 6:28 a.m. OK JavaScript TESTS 50 46 3788800 1400
58705118 Spheniscine D Aug. 13, 2019, 9:12 a.m. OK Kotlin TESTS 50 218 8396800 1400
55549410 og.kostya D June 14, 2019, 6:03 a.m. OK Mono C# TESTS 50 46 819200 1400
55729745 sb_fox D June 18, 2019, 8:08 p.m. OK Mono C# TESTS 50 62 6246400 1400
53952859 maxkh D May 10, 2019, 10:28 a.m. OK Mono C# TESTS 50 62 6246400 1400
53304302 ivanidze.kirov D April 26, 2019, 12:45 a.m. OK Mono C# TESTS 50 77 7065600 1400
62854171 nadilk D Oct. 18, 2019, 8:36 a.m. OK Mono C# TESTS 50 78 10752000 1400
52953235 Dimon2305 D April 18, 2019, 12:45 p.m. OK Mono C# TESTS 50 93 10547200 1400
53260697 NEvOl D April 24, 2019, 7:13 p.m. OK Mono C# TESTS 50 93 12800000 1400
53092495 vjudge5 D April 21, 2019, 11:55 a.m. OK MS C++ TESTS 50 31 819200 1400
53100845 vjudge3 D April 21, 2019, 4:21 p.m. OK MS C++ TESTS 50 46 0 1400
53021797 vjudge1 D April 19, 2019, 4:50 p.m. OK MS C++ TESTS 50 46 0 1400
58485091 511019727 D Aug. 9, 2019, 7:20 a.m. OK MS C++ TESTS 50 46 819200 1400
53882121 vjudge1 D May 8, 2019, 3:28 p.m. OK MS C++ TESTS 50 46 819200 1400
53656479 vjudge3 D May 2, 2019, 5:12 a.m. OK MS C++ TESTS 50 46 819200 1400
59886019 vjudge1 D Sept. 2, 2019, 7:59 a.m. OK MS C++ TESTS 50 46 819200 1400
62336813 vjudge5 D Oct. 11, 2019, 2:07 a.m. OK MS C++ TESTS 50 46 819200 1400
66897097 vjudge5 D Dec. 15, 2019, 2:42 a.m. OK MS C++ TESTS 50 46 819200 1400
67278389 vjudge3 D Dec. 20, 2019, 11:05 a.m. OK MS C++ TESTS 50 46 819200 1400
53820407 yp0413170331 D May 6, 2019, 12:51 p.m. OK MS C++ 2017 TESTS 50 61 819200 1400
53161887 CtrlAlt D April 22, 2019, 4:41 p.m. OK MS C++ 2017 TESTS 50 62 0 1400
66639635 vjudge4 D Dec. 11, 2019, 2:14 p.m. OK MS C++ 2017 TESTS 50 62 307200 1400
53882162 shoulinniao D May 8, 2019, 3:29 p.m. OK MS C++ 2017 TESTS 50 62 819200 1400
53121821 A19180288 D April 22, 2019, 11:44 a.m. OK MS C++ 2017 TESTS 50 62 819200 1400
53195556 WocBug D April 23, 2019, 3:04 p.m. OK MS C++ 2017 TESTS 50 62 819200 1400
68152797 vjudge5 D Jan. 4, 2020, 7:38 a.m. OK MS C++ 2017 TESTS 50 62 819200 1400
57278136 admin999 D July 18, 2019, 11:42 a.m. OK MS C++ 2017 TESTS 50 62 819200 1400
55109771 TOXait D June 5, 2019, 5:33 a.m. OK MS C++ 2017 TESTS 50 62 819200 1400
52923069 AleksanderBalobanov D April 17, 2019, 6:50 p.m. OK MS C++ 2017 TESTS 50 62 1228800 1400
55553352 mayakin D June 14, 2019, 8:32 a.m. OK PHP TESTS 50 77 14745600 1400
53495579 lostamok D April 29, 2019, 11:33 a.m. OK PHP TESTS 50 93 409600 1400
53056816 thenewguy39 D April 20, 2019, 6:02 p.m. OK PyPy 2 TESTS 50 155 8806400 1400
52921636 raj1307 D April 17, 2019, 6:06 p.m. OK PyPy 2 TESTS 50 202 9625600 1400
53673449 gatsko D May 2, 2019, 2:26 p.m. OK PyPy 2 TESTS 50 233 10854400 1400
59590542 ssk497 D Aug. 27, 2019, 8:13 p.m. OK PyPy 2 TESTS 50 233 13004800 1400
53103721 Cubbee D April 21, 2019, 6:12 p.m. OK PyPy 3 TESTS 50 186 11059200 1400
54376736 modestas_ D May 19, 2019, 9:06 a.m. OK PyPy 3 TESTS 50 186 13004800 1400
67666290 AvinashKartik D Dec. 26, 2019, 6 p.m. OK PyPy 3 TESTS 50 187 12595200 1400
53974449 nealzane D May 11, 2019, 2:38 a.m. OK PyPy 3 TESTS 50 187 12800000 1400
53107001 skyberg D April 21, 2019, 8:56 p.m. OK PyPy 3 TESTS 50 187 12800000 1400
65766537 spiritofrider D Nov. 26, 2019, 6:14 p.m. OK PyPy 3 TESTS 50 187 13004800 1400
63914008 lilter_69 D Oct. 31, 2019, 9:22 a.m. OK PyPy 3 TESTS 50 187 13004800 1400
53568780 teekteek D April 30, 2019, 1:57 p.m. OK PyPy 3 TESTS 50 187 13004800 1400
53208432 radeye D April 24, 2019, 1:59 a.m. OK PyPy 3 TESTS 50 187 13004800 1400
53205290 mattiasm83 D April 23, 2019, 9:08 p.m. OK PyPy 3 TESTS 50 187 13004800 1400
54415928 phoenix28 D May 20, 2019, 12:35 p.m. OK Python 2 TESTS 50 296 4300800 1400
53056750 kaif_7 D April 20, 2019, 5:59 p.m. OK Python 2 TESTS 50 311 2867200 1400
53389201 creewick D April 27, 2019, 6:06 a.m. OK Python 3 TESTS 50 155 3072000 1400
53030937 erickjohnross D April 19, 2019, 11:59 p.m. OK Python 3 TESTS 50 186 3072000 1400
54816077 plosique D May 29, 2019, 8:01 p.m. OK Python 3 TESTS 50 187 3072000 1400
53218518 wentwrong D April 24, 2019, 10:31 a.m. OK Python 3 TESTS 50 187 3072000 1400
53108324 Rooch001 D April 21, 2019, 10:22 p.m. OK Python 3 TESTS 50 187 3891200 1400
53378968 vjudge3 D April 26, 2019, 9:03 p.m. OK Python 3 TESTS 50 202 3072000 1400
53340239 vbshubham D April 26, 2019, 3:17 p.m. OK Python 3 TESTS 50 202 3072000 1400
53203361 megabluejay D April 23, 2019, 7:23 p.m. OK Python 3 TESTS 50 202 3072000 1400
52919795 edward454 D April 17, 2019, 5:19 p.m. OK Python 3 TESTS 50 202 3072000 1400
53796128 Suzukaze D May 5, 2019, 3:24 p.m. OK Python 3 TESTS 50 202 4096000 1400
53111817 BalabanovoGrief D April 22, 2019, 4 a.m. OK Rust TESTS 50 31 1024000 1400
53440974 osa_k D April 28, 2019, 12:09 a.m. OK Rust TESTS 50 31 2560000 1400

remove filters

Back to search problems