Codeforces Global Round 10

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
1392 Codeforces Global Round 10 FINISHED False 10800 134234699 Aug. 16, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 18864 ) C Omkar and Waterslide PROGRAMMING greedy implementation

B'Omkar is building a waterslide in his water park, and he needs your help to ensure that he does it as efficiently as possible. Omkar currently has n supports arranged in a line, the i -th of which has height a_i . Omkar wants to build his waterslide from the right to the left, so his supports must be nondecreasing in height in order to support the waterslide. In 1 operation, Omkar can do the following: take any contiguous subsegment of supports which is nondecreasing by heights and add 1 to each of their heights. Help Omkar find the minimum number of operations he needs to perform to make his supports able to support his waterslide! An array b is a subsegment of an array c if b can be obtained from c by deletion of several (possibly zero or all) elements from the beginning and several (possibly zero or all) elements from the end. An array b_1, b_2, ... , b_n is called nondecreasing if b_i <= b_{i+1} for every i from 1 to n-1 . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= q t <= q 100 ). Description of the test cases follows. The first line of each test case contains an integer n ( 1 <= q n <= q 2 cdot 10^5 ) -- the number of supports Omkar has. The second line of each test case contains n integers a_{1},a_{2},...,a_{n} (0 <= q a_{i} <= q 10^9) -- the heights of the supports. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output a single integer -- the minimum number of operations Omkar needs to perform to make his supports able to support his waterslide. The subarray with which Omkar performs the operation is bolded. In the first test case: First operation: [5, 3, textbf{2}, 5] to [5, 3, textbf{3}, 5] Second operation: [5, textbf{3}, textbf{3}, 5] to [5, textbf{4}, textbf{4}, 5] Third opera'...

Tutorials

Codeforces Global Round 10 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
90329463 asgardcodegod C Aug. 18, 2020, 4:45 p.m. OK Clang++17 Diagnostics TESTS 36 1045 1638400
90303140 Z__Y C Aug. 18, 2020, 11:33 a.m. OK FPC TESTS 36 77 2252800
90316910 ajoydey00001 C Aug. 18, 2020, 2:31 p.m. OK GNU C11 TESTS 36 62 1638400
90889878 M_Mantas C Aug. 25, 2020, 10:20 a.m. OK GNU C11 TESTS 36 62 1843200
91596848 aebtll C Sept. 1, 2020, 7:52 p.m. OK GNU C11 TESTS 36 77 1638400
91654203 sahasubarna08041 C Sept. 2, 2020, 3:26 p.m. OK GNU C11 TESTS 36 77 4812800
91654146 -----Thor---- C Sept. 2, 2020, 3:25 p.m. OK GNU C11 TESTS 36 77 4812800
90896105 nitinkumar1729 C Aug. 25, 2020, 11:49 a.m. OK GNU C11 TESTS 36 78 1638400
90507931 Rohitttt C Aug. 21, 2020, 6:27 a.m. OK GNU C11 TESTS 36 78 5529600
91597926 aebtll C Sept. 1, 2020, 8:18 p.m. OK GNU C11 TESTS 36 93 0
90376339 Heartbeat666 C Aug. 19, 2020, 9:41 a.m. OK GNU C++11 TESTS 36 31 0
90359451 jiaangk_ C Aug. 19, 2020, 5:29 a.m. OK GNU C++11 TESTS 36 31 0
91660435 Rajib_119 C Sept. 2, 2020, 4:45 p.m. OK GNU C++11 TESTS 36 31 819200
90389859 hnust_liuxin C Aug. 19, 2020, 12:58 p.m. OK GNU C++11 TESTS 36 31 1638400
90464513 hjww C Aug. 20, 2020, 1:06 p.m. OK GNU C++11 TESTS 36 31 1638400
90396431 Karry5307 C Aug. 19, 2020, 2:22 p.m. OK GNU C++11 TESTS 36 31 1638400
91014798 luogu_bot3 C Aug. 26, 2020, 3:57 a.m. OK GNU C++11 TESTS 36 46 0
91205134 JasonLan C Aug. 28, 2020, 11:59 a.m. OK GNU C++11 TESTS 36 46 819200
90465694 hjww C Aug. 20, 2020, 1:22 p.m. OK GNU C++11 TESTS 36 46 1638400
90455771 kimyon C Aug. 20, 2020, 10:56 a.m. OK GNU C++11 TESTS 36 46 3174400
90736414 q234rty C Aug. 23, 2020, 7:49 a.m. OK GNU C++14 TESTS 36 46 13721600
90330570 pokhi_96 C Aug. 18, 2020, 5 p.m. OK GNU C++14 TESTS 36 77 819200
91606310 wnb C Sept. 2, 2020, 2:24 a.m. OK GNU C++14 TESTS 36 77 819200
90906276 XgonHiker C Aug. 25, 2020, 2:11 p.m. OK GNU C++14 TESTS 36 77 819200
90853851 bugs_Funny C Aug. 24, 2020, 6:56 p.m. OK GNU C++14 TESTS 36 77 819200
90840269 im_juel C Aug. 24, 2020, 3:37 p.m. OK GNU C++14 TESTS 36 77 819200
90492610 FromDihPout C Aug. 20, 2020, 7:36 p.m. OK GNU C++14 TESTS 36 77 819200
90351907 iec2017020 C Aug. 19, 2020, 2:12 a.m. OK GNU C++14 TESTS 36 77 819200
91254443 ayush_123_ C Aug. 29, 2020, 4:08 a.m. OK GNU C++14 TESTS 36 77 819200
90947707 Harsh432 C Aug. 25, 2020, 3:32 p.m. OK GNU C++14 TESTS 36 77 819200
90420815 sirearsh C Aug. 19, 2020, 9:14 p.m. OK GNU C++17 TESTS 36 46 819200
91211900 eyesofgod123 C Aug. 28, 2020, 1:31 p.m. OK GNU C++17 TESTS 36 46 921600
90392101 Just_A_Prime C Aug. 19, 2020, 1:27 p.m. OK GNU C++17 TESTS 36 46 1024000
90384318 bandiaoz C Aug. 19, 2020, 11:38 a.m. OK GNU C++17 TESTS 36 46 1740800
90309928 nong C Aug. 18, 2020, 1:05 p.m. OK GNU C++17 TESTS 36 62 819200
91565196 sirjoshua C Sept. 1, 2020, 12:37 p.m. OK GNU C++17 TESTS 36 62 819200
90361254 chen_zexing C Aug. 19, 2020, 6 a.m. OK GNU C++17 TESTS 36 62 819200
90313440 Hide_0n_Bush C Aug. 18, 2020, 1:51 p.m. OK GNU C++17 TESTS 36 62 819200
90538913 huypt C Aug. 21, 2020, 2:11 p.m. OK GNU C++17 TESTS 36 62 5324800
91582049 MoNir_ C Sept. 1, 2020, 4 p.m. OK GNU C++17 TESTS 36 77 819200
91175804 LiChenKoh C Aug. 28, 2020, 3:03 a.m. OK GNU C++17 (64) TESTS 36 31 1638400
91499491 Aman_j1 C Aug. 31, 2020, 2:25 p.m. OK GNU C++17 (64) TESTS 36 46 819200
91169340 elyutin159164 C Aug. 27, 2020, 10:02 p.m. OK GNU C++17 (64) TESTS 36 46 1638400
91183232 zxcv_1 C Aug. 28, 2020, 6:08 a.m. OK GNU C++17 (64) TESTS 36 61 819200
90339845 FCUKmodiBhakts C Aug. 18, 2020, 7:15 p.m. OK GNU C++17 (64) TESTS 36 61 1638400
90338123 catismyfav C Aug. 18, 2020, 6:46 p.m. OK GNU C++17 (64) TESTS 36 61 1638400
90359592 infinite_dive C Aug. 19, 2020, 5:32 a.m. OK GNU C++17 (64) TESTS 36 61 1638400
90465959 Perdente C Aug. 20, 2020, 1:25 p.m. OK GNU C++17 (64) TESTS 36 61 1638400
91224793 shajal C Aug. 28, 2020, 3:52 p.m. OK GNU C++17 (64) TESTS 36 61 3276800
90788316 _protector_ C Aug. 24, 2020, 12:32 a.m. OK GNU C++17 (64) TESTS 36 61 4300800
90634910 Trishan C Aug. 21, 2020, 7:53 p.m. OK Go TESTS 36 93 16998400
91282755 bnurgeldiyev514 C Aug. 29, 2020, 12:07 p.m. OK Go TESTS 36 171 4505600
90643408 BugLeave C Aug. 22, 2020, 12:28 a.m. OK Go TESTS 36 171 10854400
90360688 toxic4u C Aug. 19, 2020, 5:51 a.m. OK Java 11 TESTS 36 187 0
90539748 bckslsh03 C Aug. 21, 2020, 2:21 p.m. OK Java 11 TESTS 36 202 23756800
90304381 ssd17 C Aug. 18, 2020, 11:49 a.m. OK Java 11 TESTS 36 217 0
90665931 nikhilmishra1211 C Aug. 22, 2020, 7:36 a.m. OK Java 11 TESTS 36 218 28057600
90510250 glider.g C Aug. 21, 2020, 7:25 a.m. OK Java 11 TESTS 36 218 28057600
91030826 jamesfan961101 C Aug. 26, 2020, 8:02 a.m. OK Java 11 TESTS 36 233 3174400
91547144 Prateek_Jakhar C Sept. 1, 2020, 8:04 a.m. OK Java 11 TESTS 36 233 3174400
90897248 sj3959 C Aug. 25, 2020, 12:05 p.m. OK Java 11 TESTS 36 233 4096000
90326901 HowYouDoing C Aug. 18, 2020, 4:16 p.m. OK Java 11 TESTS 36 233 4096000
90692303 777turbo77 C Aug. 22, 2020, 1:50 p.m. OK Java 11 TESTS 36 233 28057600
90850800 mufaddalnaya C Aug. 24, 2020, 5:59 p.m. OK Java 8 TESTS 36 124 0
90721303 tirth9960 C Aug. 23, 2020, 1:04 a.m. OK Java 8 TESTS 36 124 20275200
90446336 bluesky111 C Aug. 20, 2020, 8:32 a.m. OK Java 8 TESTS 36 140 0
90335116 varun4996 C Aug. 18, 2020, 6 p.m. OK Java 8 TESTS 36 155 9011200
90386250 wadissimo C Aug. 19, 2020, 12:06 p.m. OK Java 8 TESTS 36 155 11161600
91602722 O-infinity C Sept. 1, 2020, 11:28 p.m. OK Java 8 TESTS 36 155 11264000
91107966 Tharun0102 C Aug. 27, 2020, 6:22 a.m. OK Java 8 TESTS 36 155 11366400
91685846 OnFireVivek C Sept. 3, 2020, 4:12 a.m. OK Java 8 TESTS 36 155 14643200
90508196 nandit C Aug. 21, 2020, 6:37 a.m. OK Java 8 TESTS 36 155 20275200
90778683 MetaStash C Aug. 23, 2020, 6:20 p.m. OK Java 8 TESTS 36 155 33894400
90472206 dkozak94 C Aug. 20, 2020, 2:40 p.m. OK Kotlin TESTS 36 171 12288000
90538725 wuchaojie925 C Aug. 21, 2020, 2:09 p.m. OK Kotlin TESTS 36 218 40345600
90764403 Rivankata C Aug. 23, 2020, 2:39 p.m. OK Kotlin TESTS 36 233 40038400
91597087 thunderboltz C Sept. 1, 2020, 7:58 p.m. OK Kotlin TESTS 36 343 16691200
91286644 felix412441 C Aug. 29, 2020, 1:13 p.m. OK Kotlin TESTS 36 343 16691200
91476753 koper C Aug. 31, 2020, 9:21 a.m. OK Kotlin TESTS 36 343 38400000
91334830 treasuryonly C Aug. 30, 2020, 10:42 a.m. OK Mono C# TESTS 36 139 34201600
90299349 TRR C Aug. 18, 2020, 10:41 a.m. OK Mono C# TESTS 36 171 26828800
90349962 TheSoundOfZero C Aug. 19, 2020, 1:04 a.m. OK MS C++ TESTS 36 202 819200
90499324 amitrastogi2206 C Aug. 20, 2020, 11:21 p.m. OK MS C++ TESTS 36 202 1024000
90535171 vjudge1 C Aug. 21, 2020, 1:23 p.m. OK MS C++ 2017 TESTS 36 78 4812800
90866459 Steve1234 C Aug. 25, 2020, 4:10 a.m. OK MS C++ 2017 TESTS 36 93 1024000
91681572 shebao C Sept. 3, 2020, 2 a.m. OK MS C++ 2017 TESTS 36 93 1024000
90389427 psb2942 C Aug. 19, 2020, 12:52 p.m. OK MS C++ 2017 TESTS 36 93 2764800
90698070 getN1ght C Aug. 22, 2020, 3:08 p.m. OK MS C++ 2017 TESTS 36 187 4505600
90372182 your_soulmate C Aug. 19, 2020, 8:40 a.m. OK MS C++ 2017 TESTS 36 202 819200
90387634 tanass C Aug. 19, 2020, 12:27 p.m. OK MS C++ 2017 TESTS 36 202 1638400
91061816 areo C Aug. 26, 2020, 2:22 p.m. OK MS C++ 2017 TESTS 36 217 0
90651417 Rishabh9451 C Aug. 22, 2020, 4:07 a.m. OK MS C++ 2017 TESTS 36 217 4505600
90307684 DiSTRuCtO C Aug. 18, 2020, 12:35 p.m. OK MS C++ 2017 TESTS 36 218 1024000
90713036 yumtam C Aug. 22, 2020, 7:10 p.m. OK PyPy 2 TESTS 36 140 39936000
90370808 2019ucp1350 C Aug. 19, 2020, 8:20 a.m. OK PyPy 3 TESTS 36 202 19353600
90298958 anubhavsinha98 C Aug. 18, 2020, 10:35 a.m. OK PyPy 3 TESTS 36 234 19660800
90291377 AdarshSrivastav C Aug. 18, 2020, 8:46 a.m. OK PyPy 3 TESTS 36 296 19251200
90454492 revathi13 C Aug. 20, 2020, 10:38 a.m. OK PyPy 3 TESTS 36 312 19148800
91161291 Mkay6122 C Aug. 27, 2020, 6:39 p.m. OK PyPy 3 TESTS 36 326 19148800
90445684 one_step_away C Aug. 20, 2020, 8:22 a.m. OK PyPy 3 TESTS 36 327 16793600
90892933 maravdm C Aug. 25, 2020, 11:04 a.m. OK PyPy 3 TESTS 36 327 18022400
90452641 3141somethingpi C Aug. 20, 2020, 10:08 a.m. OK PyPy 3 TESTS 36 327 18636800
90378623 Tieway59 C Aug. 19, 2020, 10:17 a.m. OK PyPy 3 TESTS 36 327 18636800
90315058 eepsilon C Aug. 18, 2020, 2:10 p.m. OK PyPy 3 TESTS 36 327 18636800
90494433 groupbuilder C Aug. 20, 2020, 8:18 p.m. OK Python 2 TESTS 36 389 12288000
90299167 SecretProgrammer10 C Aug. 18, 2020, 10:38 a.m. OK Python 3 TESTS 36 218 18534400
90416003 abhisheka950 C Aug. 19, 2020, 7:05 p.m. OK Python 3 TESTS 36 218 18636800
90311978 noisegain C Aug. 18, 2020, 1:32 p.m. OK Python 3 TESTS 36 233 16998400
91350263 Mr.Krishna C Aug. 30, 2020, 2:30 p.m. OK Python 3 TESTS 36 233 25088000
90901751 Oomdy C Aug. 25, 2020, 1:09 p.m. OK Python 3 TESTS 36 234 16793600
90431273 SaykaT C Aug. 20, 2020, 4:11 a.m. OK Python 3 TESTS 36 248 18432000
90431245 TheKingsGaurd C Aug. 20, 2020, 4:10 a.m. OK Python 3 TESTS 36 248 18432000
90379175 Tieway59 C Aug. 19, 2020, 10:25 a.m. OK Python 3 TESTS 36 249 16691200
90344519 utkarsh73 C Aug. 18, 2020, 9:05 p.m. OK Python 3 TESTS 36 249 17510400
90417265 rishi_saraswat C Aug. 19, 2020, 7:33 p.m. OK Python 3 TESTS 36 249 18329600
90660956 Strorkis C Aug. 22, 2020, 6:33 a.m. OK Rust TESTS 36 62 11161600
90462268 n1tz53 C Aug. 20, 2020, 12:34 p.m. OK Rust TESTS 36 62 12800000
90777782 Chipe1 C Aug. 23, 2020, 6:02 p.m. OK Rust TESTS 36 62 15769600
90469714 pandrei C Aug. 20, 2020, 2:11 p.m. OK Rust TESTS 36 78 11161600

remove filters

Back to search problems