Codeforces Round 547 (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
1141 Codeforces Round 547 (Div. 3) FINISHED False 7200 178817099 March 19, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6792 ) E Superhero Battle PROGRAMMING math 1700

B"A superhero fights with a monster. The battle consists of rounds, each of which lasts exactly n minutes. After a round ends, the next round starts immediately. This is repeated over and over again. Each round has the same scenario. It is described by a sequence of n numbers: d_1, d_2, ... , d_n ( -10^6 <= d_i <= 10^6 ). The i -th element means that monster's hp (hit points) changes by the value d_i during the i -th minute of each round. Formally, if before the i -th minute of a round the monster's hp is h , then after the i -th minute it changes to h := h + d_i . The monster's initial hp is H . It means that before the battle the monster has H hit points. Print the first minute after which the monster dies. The monster dies if its hp is less than or equal to 0 . Print -1 if the battle continues infinitely. The first line contains two integers H and n ( 1 <= H <= 10^{12} , 1 <= n <= 2 cdot10^5 ). The second line contains the sequence of integers d_1, d_2, ... , d_n ( -10^6 <= d_i <= 10^6 ), where d_i is the value to change monster's hp in the i -th minute of a round. Print -1 if the superhero can't kill the monster and the battle will last infinitely. Otherwise, print the positive integer k such that k is the first minute after which the monster is dead. "...

Tutorials

66062

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
52726572 Denor E April 14, 2019, 1:02 a.m. OK Delphi TESTS 119 77 1638400 1700
61757538 LaSWeeG E Oct. 3, 2019, 6:04 a.m. OK FPC TESTS 119 62 819200 1700
56748332 bin9638 E July 9, 2019, 10:50 a.m. OK FPC TESTS 119 62 1638400 1700
51844191 thantrongtri3 E March 26, 2019, 2:39 a.m. OK FPC TESTS 119 62 1740800 1700
52146066 chaorenhaha E April 1, 2019, 9:24 a.m. OK FPC TESTS 119 62 6451200 1700
52252909 vjudge2 E April 3, 2019, 2:42 a.m. OK FPC TESTS 119 78 1638400 1700
52252896 Kyuu E April 3, 2019, 2:41 a.m. OK FPC TESTS 119 92 1638400 1700
51878399 TheRain E March 26, 2019, 9:08 p.m. OK GNU C11 TESTS 119 46 2867200 1700
53824842 rainboy E May 6, 2019, 3:24 p.m. OK GNU C11 TESTS 119 62 819200 1700
52021334 Potassium_ E March 30, 2019, 12:53 p.m. OK GNU C11 TESTS 119 62 1638400 1700
52307497 ananaygupta70 E April 4, 2019, 12:59 p.m. OK GNU C11 TESTS 119 62 1638400 1700
52372886 chowdhuryshashwoto E April 6, 2019, 7:01 a.m. OK GNU C11 TESTS 119 62 1638400 1700
52372364 chowdhuryshashwoto E April 6, 2019, 6:47 a.m. OK GNU C11 TESTS 119 77 1638400 1700
58430295 gubeiqg E Aug. 7, 2019, 11:34 a.m. OK GNU C++11 TESTS 119 31 1638400 1700
62853192 Kylin_ E Oct. 18, 2019, 8:13 a.m. OK GNU C++11 TESTS 119 31 3788800 1700
52524966 zhouzhuan E April 9, 2019, 11 a.m. OK GNU C++11 TESTS 119 31 6451200 1700
51844723 whymhe E March 26, 2019, 3:18 a.m. OK GNU C++11 TESTS 119 46 1638400 1700
52730962 akioi E April 14, 2019, 3:54 a.m. OK GNU C++11 TESTS 119 46 1638400 1700
58063870 luogu_bot3 E July 31, 2019, 8:19 a.m. OK GNU C++11 TESTS 119 46 1638400 1700
52008165 Shan_Xian E March 30, 2019, 8:21 a.m. OK GNU C++11 TESTS 119 46 1638400 1700
51938805 wasa855 E March 28, 2019, 1:37 p.m. OK GNU C++11 TESTS 119 46 1638400 1700
51896425 luogu_bot1 E March 27, 2019, 11:46 a.m. OK GNU C++11 TESTS 119 46 2457600 1700
65717652 TheRain E Nov. 25, 2019, 5:22 p.m. OK GNU C++11 TESTS 119 46 2662400 1700
51919820 minty99 E March 28, 2019, 3:05 a.m. OK GNU C++14 TESTS 119 62 819200 1700
67762170 MB1151 E Dec. 27, 2019, 11:40 p.m. OK GNU C++14 TESTS 119 62 819200 1700
56523287 Immortal_ua E July 4, 2019, 3:57 p.m. OK GNU C++14 TESTS 119 62 819200 1700
54173336 HipHop E May 15, 2019, 12:35 p.m. OK GNU C++14 TESTS 119 62 819200 1700
53788880 wangshu E May 5, 2019, 11:44 a.m. OK GNU C++14 TESTS 119 62 819200 1700
52603687 YuMing_mov E April 11, 2019, 1:02 p.m. OK GNU C++14 TESTS 119 62 819200 1700
52269147 humveea6 E April 3, 2019, 12:30 p.m. OK GNU C++14 TESTS 119 62 819200 1700
52258528 wclee2265 E April 3, 2019, 7:21 a.m. OK GNU C++14 TESTS 119 62 819200 1700
68346736 9957 E Jan. 7, 2020, 7:40 a.m. OK GNU C++14 TESTS 119 62 1536000 1700
57485905 vjudge1 E July 22, 2019, 5:19 a.m. OK GNU C++14 TESTS 119 62 1638400 1700
52743315 .tx E April 14, 2019, 10:20 a.m. OK GNU C++17 TESTS 119 31 819200 1700
51800357 dmkozyrev E March 24, 2019, 5:40 p.m. OK GNU C++17 TESTS 119 31 921600 1700
58694577 dmkozyrev E Aug. 13, 2019, 5:22 a.m. OK GNU C++17 TESTS 119 31 921600 1700
55295449 MishaI2004 E June 8, 2019, 9:41 a.m. OK GNU C++17 TESTS 119 46 921600 1700
52654408 vjudge5 E April 12, 2019, 6:07 p.m. OK GNU C++17 TESTS 119 61 819200 1700
57073324 vjudge2 E July 15, 2019, 3:44 a.m. OK GNU C++17 TESTS 119 62 819200 1700
54474233 haylee E May 22, 2019, 7:27 a.m. OK GNU C++17 TESTS 119 62 819200 1700
53302254 Wael.Al.Jamal E April 25, 2019, 9:56 p.m. OK GNU C++17 TESTS 119 62 819200 1700
52654631 vjudge5 E April 12, 2019, 6:13 p.m. OK GNU C++17 TESTS 119 62 819200 1700
52587788 despair E April 11, 2019, 2:26 a.m. OK GNU C++17 TESTS 119 62 819200 1700
52244241 cs_office E April 2, 2019, 6:11 p.m. OK Go TESTS 119 62 5324800 1700
67795919 sighduck E Dec. 28, 2019, 4:39 p.m. OK Go TESTS 119 171 0 1700
54070669 anilsaxena E May 13, 2019, 4:03 p.m. OK Java 8 TESTS 119 124 0 1700
54558690 gaidash E May 24, 2019, 12:52 p.m. OK Java 8 TESTS 119 124 0 1700
53794195 anilsaxena E May 5, 2019, 2:31 p.m. OK Java 8 TESTS 119 124 0 1700
52259794 prakhar897 E April 3, 2019, 8:07 a.m. OK Java 8 TESTS 119 124 0 1700
54545841 gaidash E May 24, 2019, 6:08 a.m. OK Java 8 TESTS 119 139 0 1700
51984526 Tarun E March 29, 2019, 5:53 p.m. OK Java 8 TESTS 119 140 0 1700
52543105 Piccadilly E April 9, 2019, 7:15 p.m. OK Java 8 TESTS 119 140 2048000 1700
53312954 Lovinix E April 26, 2019, 8:15 a.m. OK Java 8 TESTS 119 140 2150400 1700
62826759 sonusingh.nitaa E Oct. 17, 2019, 6:20 p.m. OK Java 8 TESTS 119 155 2150400 1700
56135787 Sleeperino E June 26, 2019, 9:51 p.m. OK Java 8 TESTS 119 155 2150400 1700
58117092 Spheniscine E Aug. 1, 2019, 9:14 a.m. OK Kotlin TESTS 119 327 6963200 1700
58116814 Spheniscine E Aug. 1, 2019, 9:09 a.m. OK Kotlin TESTS 119 343 6963200 1700
58116559 Spheniscine E Aug. 1, 2019, 9:03 a.m. OK Kotlin TESTS 119 343 6963200 1700
55678725 og.kostya E June 17, 2019, 11:54 a.m. OK Mono C# TESTS 119 62 1536000 1700
52278773 treasuryonly E April 3, 2019, 3:57 p.m. OK Mono C# TESTS 119 124 21094400 1700
53592074 ivanidze.kirov E May 1, 2019, 1:08 a.m. OK Mono C# TESTS 119 140 19353600 1700
63114865 hibatibati E Oct. 22, 2019, 8:58 a.m. OK Mono C# TESTS 119 140 28262400 1700
53822867 vjudge2 E May 6, 2019, 2:13 p.m. OK MS C++ TESTS 119 46 819200 1700
53304929 scorpiowf E April 26, 2019, 1:48 a.m. OK MS C++ TESTS 119 61 1228800 1700
57443455 vjudge2 E July 21, 2019, 7:29 a.m. OK MS C++ TESTS 119 61 1638400 1700
53790126 vjudge3 E May 5, 2019, 12:21 p.m. OK MS C++ TESTS 119 61 1638400 1700
57451151 vjudge3 E July 21, 2019, 9:46 a.m. OK MS C++ TESTS 119 61 3174400 1700
53468380 vjudge4 E April 28, 2019, 11:26 a.m. OK MS C++ TESTS 119 62 819200 1700
53495628 vjudge1 E April 29, 2019, 11:35 a.m. OK MS C++ TESTS 119 62 819200 1700
57447046 vjudge4 E July 21, 2019, 8:32 a.m. OK MS C++ TESTS 119 62 819200 1700
53498144 vjudge5 E April 29, 2019, 12:54 p.m. OK MS C++ TESTS 119 62 819200 1700
53498051 vjudge1 E April 29, 2019, 12:51 p.m. OK MS C++ TESTS 119 62 819200 1700
51858662 Xun_ E March 26, 2019, 12:15 p.m. OK MS C++ 2017 TESTS 119 78 1638400 1700
51852571 Xun_ E March 26, 2019, 8:54 a.m. OK MS C++ 2017 TESTS 119 78 1638400 1700
56588240 CtrlAlt E July 5, 2019, 4:50 p.m. OK MS C++ 2017 TESTS 119 93 3174400 1700
51853888 Straik E March 26, 2019, 9:36 a.m. OK MS C++ 2017 TESTS 119 171 819200 1700
51991734 SendThemToHell E March 29, 2019, 8:36 p.m. OK MS C++ 2017 TESTS 119 171 1638400 1700
52611053 ahmadarab E April 11, 2019, 4:04 p.m. OK MS C++ 2017 TESTS 119 171 1638400 1700
51824565 SyavaSpb E March 25, 2019, 1:30 p.m. OK MS C++ 2017 TESTS 119 171 3174400 1700
59167755 yomyom0824 E Aug. 20, 2019, 3:35 p.m. OK MS C++ 2017 TESTS 119 186 3276800 1700
51977345 feshfesh123 E March 29, 2019, 2:48 p.m. OK MS C++ 2017 TESTS 119 187 819200 1700
53019293 Kirja_ES E April 19, 2019, 3:41 p.m. OK MS C++ 2017 TESTS 119 187 1638400 1700
56036286 Gimber E June 25, 2019, 12:13 p.m. OK PascalABC.NET TESTS 119 358 1228800 1700
51806572 amr.magdy E March 24, 2019, 10:30 p.m. OK PyPy 2 TESTS 119 202 12595200 1700
52470273 cherry_su E April 7, 2019, 6:06 p.m. OK PyPy 2 TESTS 119 217 13107200 1700
51939739 soumyasarkar1998 E March 28, 2019, 1:58 p.m. OK PyPy 2 TESTS 119 233 17920000 1700
59574477 fastnoise E Aug. 27, 2019, 1:41 p.m. OK PyPy 2 TESTS 119 248 12697600 1700
59679411 ssk497 E Aug. 29, 2019, 7:45 p.m. OK PyPy 2 TESTS 119 295 22118400 1700
59575947 fastnoise E Aug. 27, 2019, 2:10 p.m. OK PyPy 2 TESTS 119 452 12697600 1700
52253552 acesine E April 3, 2019, 3:20 a.m. OK PyPy 3 TESTS 119 264 19353600 1700
52173775 Stephan E April 1, 2019, 3:46 p.m. OK PyPy 3 TESTS 119 280 19456000 1700
54322606 Pedantic E May 17, 2019, 10:52 p.m. OK PyPy 3 TESTS 119 280 19558400 1700
52530093 jeqcho E April 9, 2019, 1:07 p.m. OK PyPy 3 TESTS 119 280 19558400 1700
54735874 Aidos E May 28, 2019, 4:53 a.m. OK PyPy 3 TESTS 119 295 19660800 1700
52463577 Kirillov_Alexey E April 7, 2019, 2:27 p.m. OK PyPy 3 TESTS 119 295 19660800 1700
51869327 notbot E March 26, 2019, 4:39 p.m. OK PyPy 3 TESTS 119 296 19660800 1700
51820855 ..vince E March 25, 2019, 11:59 a.m. OK PyPy 3 TESTS 119 296 22528000 1700
54700517 knight-erraunt E May 26, 2019, 10:43 p.m. OK PyPy 3 TESTS 119 311 23142400 1700
51947905 Spelvin E March 28, 2019, 6 p.m. OK PyPy 3 TESTS 119 311 23244800 1700
52471170 robot-dreams E April 7, 2019, 6:40 p.m. OK Python 2 TESTS 119 390 12390400 1700
54262572 striver_79 E May 17, 2019, 3:16 a.m. OK Python 2 TESTS 119 405 11161600 1700
51815667 SoSooding E March 25, 2019, 9 a.m. OK Python 2 TESTS 119 499 11161600 1700
51907817 tamojit9 E March 27, 2019, 4:30 p.m. OK Python 3 TESTS 119 248 15667200 1700
52282105 steveb120 E April 3, 2019, 5:35 p.m. OK Python 3 TESTS 119 249 15052800 1700
52561059 akhilnarang E April 10, 2019, 10:25 a.m. OK Python 3 TESTS 119 311 15769600 1700
51942232 Soapen hops378 Felerius E March 28, 2019, 2:58 p.m. OK Python 3 TESTS 119 311 15974400 1700
54700509 knight-erraunt E May 26, 2019, 10:43 p.m. OK Python 3 TESTS 119 312 15052800 1700
52682011 akhilnarang E April 13, 2019, 12:55 p.m. OK Python 3 TESTS 119 312 15667200 1700
54521871 Mayank08 E May 23, 2019, 12:38 p.m. OK Python 3 TESTS 119 327 27238400 1700
66450871 wired E Dec. 7, 2019, 11:26 a.m. OK Python 3 TESTS 119 343 15052800 1700
56548249 brosucks E July 5, 2019, 8:34 a.m. OK Python 3 TESTS 119 358 17408000 1700
65790407 rached13 E Nov. 26, 2019, 9:52 p.m. OK Python 3 TESTS 119 373 15769600 1700
59939766 Lancern E Sept. 3, 2019, 11 a.m. OK Rust TESTS 119 46 1638400 1700
61397851 sansen E Sept. 28, 2019, 3:29 a.m. OK Rust TESTS 119 62 3686400 1700
52326320 alykov E April 5, 2019, 12:59 a.m. OK Rust TESTS 119 62 5529600 1700
52325991 alykov E April 5, 2019, 12:35 a.m. OK Rust TESTS 119 62 5529600 1700
52510930 Budstalion E April 8, 2019, 10:56 p.m. OK Scala TESTS 119 592 19968000 1700

remove filters

Back to search problems