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 139591463 Aug. 16, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2195 ) F Omkar and Landslide PROGRAMMING binary search constructive algorithms greedy math

B'Omkar is standing at the foot of Celeste mountain. The summit is n meters away from him, and he can see all of the mountains up to the summit, so for all 1 <= q j <= q n he knows that the height of the mountain at the point j meters away from himself is h_j meters. It turns out that for all j satisfying 1 <= q j <= q n - 1 , h_j < h_{j + 1} (meaning that heights are strictly increasing). Suddenly, a landslide occurs! While the landslide is occurring, the following occurs: every minute, if h_j + 2 <= q h_{j + 1} , then one square meter of dirt will slide from position j + 1 to position j , so that h_{j + 1} is decreased by 1 and h_j is increased by 1 . These changes occur simultaneously, so for example, if h_j + 2 <= q h_{j + 1} and h_{j + 1} + 2 <= q h_{j + 2} for some j , then h_j will be increased by 1 , h_{j + 2} will be decreased by 1 , and h_{j + 1} will be both increased and decreased by 1 , meaning that in effect h_{j + 1} is unchanged during that minute. The landslide ends when there is no j such that h_j + 2 <= q h_{j + 1} . Help Omkar figure out what the values of h_1, ... , h_n will be after the landslide ends. It can be proven that under the given constraints, the landslide will always end in finitely many minutes. Note that because of the large amount of input, it is recommended that your code uses fast IO. The first line contains a single integer n ( 1 <= q n <= q 10^6 ). The second line contains n integers h_1, h_2, ... , h_n satisfying 0 <= q h_1 < h_2 < ... < h_n <= q 10^{12} -- the heights. Output n integers, where the j -th integer is the value of h_j after the landslide has stopped. Initially, the mountain has heights 2, 6, 7, 8 . In the first minute, we have 2 + 2 <= q 6 , so 2 increases to 3 and 6 decrease'...

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
90837686 yuzhechuan F Aug. 24, 2020, 3:07 p.m. OK GNU C++11 TESTS 92 265 3891200
91262526 yasugongshang F Aug. 29, 2020, 6:54 a.m. OK GNU C++11 TESTS 92 280 0
90879387 dqa2020 F Aug. 25, 2020, 7:49 a.m. OK GNU C++11 TESTS 92 311 7884800
91013840 2274328700 F Aug. 26, 2020, 3:36 a.m. OK GNU C++11 TESTS 92 374 0
91013774 luogu_bot3 F Aug. 26, 2020, 3:35 a.m. OK GNU C++11 TESTS 92 374 0
90360059 jiaangk_ F Aug. 19, 2020, 5:40 a.m. OK GNU C++11 TESTS 92 374 0
90808620 froggyzhang F Aug. 24, 2020, 8:32 a.m. OK GNU C++11 TESTS 92 374 4096000
90872504 WaluntOvO F Aug. 25, 2020, 6:09 a.m. OK GNU C++11 TESTS 92 374 7987200
90514884 vjudge2 F Aug. 21, 2020, 8:27 a.m. OK GNU C++11 TESTS 92 374 12595200
90396451 Karry5307 F Aug. 19, 2020, 2:22 p.m. OK GNU C++11 TESTS 92 374 16076800
90905730 uk224 F Aug. 25, 2020, 2:03 p.m. OK GNU C++14 TESTS 92 280 8499200
90534786 MagicSpark F Aug. 21, 2020, 1:18 p.m. OK GNU C++14 TESTS 92 327 20275200
90388540 TreskaPLUSe F Aug. 19, 2020, 12:39 p.m. OK GNU C++14 TESTS 92 639 7987200
90317200 Ashish.02 F Aug. 18, 2020, 2:35 p.m. OK GNU C++14 TESTS 92 639 7987200
90739396 selia F Aug. 23, 2020, 8:35 a.m. OK GNU C++14 TESTS 92 639 11776000
90364864 SheauhawJ F Aug. 19, 2020, 6:55 a.m. OK GNU C++14 TESTS 92 654 24064000
90406753 jainvenktesh F Aug. 19, 2020, 4:32 p.m. OK GNU C++14 TESTS 92 655 7987200
90866322 oipotato F Aug. 25, 2020, 4:07 a.m. OK GNU C++14 TESTS 92 655 16076800
90517912 BaThUn F Aug. 21, 2020, 9:08 a.m. OK GNU C++14 TESTS 92 670 3993600
90334039 SlowDecay F Aug. 18, 2020, 5:45 p.m. OK GNU C++14 TESTS 92 670 7987200
91057501 tloinuy F Aug. 26, 2020, 1:40 p.m. OK GNU C++17 TESTS 92 467 0
90309441 CQXYM F Aug. 18, 2020, 12:58 p.m. OK GNU C++17 TESTS 92 576 0
90516948 jhdonghj112 F Aug. 21, 2020, 8:55 a.m. OK GNU C++17 TESTS 92 592 3686400
91294815 spatarel F Aug. 29, 2020, 3:17 p.m. OK GNU C++17 TESTS 92 623 0
90374024 hnust_yanglei F Aug. 19, 2020, 9:07 a.m. OK GNU C++17 TESTS 92 655 0
90347207 jesuswr F Aug. 18, 2020, 10:57 p.m. OK GNU C++17 TESTS 92 655 0
90453183 gs17005 F Aug. 20, 2020, 10:16 a.m. OK GNU C++17 TESTS 92 655 7987200
90365366 SunshinePie F Aug. 19, 2020, 7:02 a.m. OK GNU C++17 TESTS 92 655 7987200
90353977 gzhffIThh F Aug. 19, 2020, 3:17 a.m. OK GNU C++17 TESTS 92 655 7987200
90735294 jhzjk F Aug. 23, 2020, 7:30 a.m. OK GNU C++17 TESTS 92 655 19763200
90713872 Egor.Lifar F Aug. 22, 2020, 7:30 p.m. OK GNU C++17 (64) TESTS 92 343 12288000
91263937 Parsa84 F Aug. 29, 2020, 7:16 a.m. OK GNU C++17 (64) TESTS 92 405 0
91261823 shajal F Aug. 29, 2020, 6:41 a.m. OK GNU C++17 (64) TESTS 92 405 8089600
91019915 chctxdy68 F Aug. 26, 2020, 5:35 a.m. OK GNU C++17 (64) TESTS 92 405 8089600
90518168 gxucm F Aug. 21, 2020, 9:11 a.m. OK GNU C++17 (64) TESTS 92 420 4608000
91263466 Parsa84 F Aug. 29, 2020, 7:09 a.m. OK GNU C++17 (64) TESTS 92 421 0
90508395 yamate11 F Aug. 21, 2020, 6:44 a.m. OK GNU C++17 (64) TESTS 92 421 4608000
91699882 19992147 F Sept. 3, 2020, 8:21 a.m. OK GNU C++17 (64) TESTS 92 421 8089600
90388295 sodium11 F Aug. 19, 2020, 12:36 p.m. OK GNU C++17 (64) TESTS 92 421 16076800
90349823 bmu F Aug. 19, 2020, 12:59 a.m. OK GNU C++17 (64) TESTS 92 421 16076800
90373339 Bruteforceman F Aug. 19, 2020, 8:57 a.m. OK Java 11 TESTS 92 748 50073600
90395580 idk321 F Aug. 19, 2020, 2:12 p.m. OK Java 11 TESTS 92 764 45568000
90480879 nisarg_01 F Aug. 20, 2020, 4:24 p.m. OK Java 11 TESTS 92 794 45568000
91147337 UniverseofHK F Aug. 27, 2020, 3:37 p.m. OK Java 11 TESTS 92 889 35430400
91147569 UniverseofHK F Aug. 27, 2020, 3:40 p.m. OK Java 11 TESTS 92 904 35430400
90498156 bluesky111 F Aug. 20, 2020, 10:22 p.m. OK Java 8 TESTS 92 467 7372800
91249501 godxpunk F Aug. 29, 2020, 1:01 a.m. OK Java 8 TESTS 92 654 83660800
90334811 jxin31415 F Aug. 18, 2020, 5:56 p.m. OK Java 8 TESTS 92 733 85811200
90369588 daystzh F Aug. 19, 2020, 8:02 a.m. OK Java 8 TESTS 92 1014 29184000
90372331 smiley_kat F Aug. 19, 2020, 8:42 a.m. OK Java 8 TESTS 92 1778 78233600
90373484 smiley_kat F Aug. 19, 2020, 8:59 a.m. OK Java 8 TESTS 92 1793 78233600
91163824 coder_nik F Aug. 27, 2020, 7:27 p.m. OK Java 8 TESTS 92 1856 83865600
90481551 Spheniscine F Aug. 20, 2020, 4:32 p.m. OK Kotlin TESTS 92 608 96256000
90442907 Numbervan F Aug. 20, 2020, 7:41 a.m. OK MS C++ 2017 TESTS 92 717 7987200
90783097 june_waves F Aug. 23, 2020, 8:15 p.m. OK PyPy 2 TESTS 92 1169 210022400
90414525 codecunt7 F Aug. 19, 2020, 6:36 p.m. OK PyPy 2 TESTS 92 1309 187801600
90371748 codershuvo F Aug. 19, 2020, 8:33 a.m. OK PyPy 2 TESTS 92 1325 185548800
90371300 shameles F Aug. 19, 2020, 8:27 a.m. OK PyPy 2 TESTS 92 1325 185548800
90414458 codecunt7 F Aug. 19, 2020, 6:35 p.m. OK PyPy 2 TESTS 92 1388 225689600
90371796 codershuvo F Aug. 19, 2020, 8:35 a.m. OK PyPy 2 TESTS 92 1466 221798400
90782889 june_waves F Aug. 23, 2020, 8:08 p.m. OK PyPy 3 TESTS 92 1231 208486400
90291428 generic_placeholder_name F Aug. 18, 2020, 8:47 a.m. OK PyPy 3 TESTS 92 1294 196915200
90399630 Kiri8128 F Aug. 19, 2020, 3 p.m. OK Python 3 TESTS 92 1154 79360000
90766932 Moody_in_a_hoodie F Aug. 23, 2020, 3:11 p.m. OK Python 3 TESTS 92 1388 95846400
90390436 Tieway59 F Aug. 19, 2020, 1:05 p.m. OK Python 3 TESTS 92 1590 89804800
90806152 AhsanHabib F Aug. 24, 2020, 7:57 a.m. OK Python 3 TESTS 92 1950 84787200

remove filters

Back to search problems