Codeforces Round 1101 (Div. 2)

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
2232 Codeforces Round 1101 (Div. 2) FINISHED False 7200 1956304 May 30, 2026, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 18968 ) B Cake Leveling PROGRAMMING binary search greedy math

Alice is preparing a cake for her party. However, she is in a rush, so the frosting on the cake is uneven. To quickly solve this issue, Alice will put her knife at some integer height and then sweep the frosting from left to right to make the frosting level. Formally, let (a_i) be the height of the frosting at the (i)-th position. Suppose that Alice puts her knife at some integer height (h). If the height of frosting at position (i) is greater than (h), the excess frosting will be pushed to position (i + 1). Excess frosting on position (n) will be pushed off the cake completely. Alice and her friends really love cake frosting. Since Alice might decide to serve some prefix of the cake instead of the whole cake, help her find the maximum height the frosting can be while keeping the frosting level for the first (i) positions for (i = 1, 2, \ldots, n). Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The first line of each test case contains an integer (n) ((2 \leq n \leq 2\cdot 10^5)) — the length of Alice's cake. The second line of each test case contains (n) integers (a_1,a_2,\ldots,a_n) ((1 \leq a_i \leq 10^9)) — the height of the frosting at the (i)-th position. The sum of (n) over all test cases is at most (2 \cdot 10^5). For each test case, output (n) integers where the (i)-th integer represents the maximum height the frosting can be while keeping the frosting level for the first (i) positions. The explanation of the first test case is as follows: When (i = 1), Alice is interested in the cake represented by an array (4). Since the cake is already leveled, the maximum height the frosting can be is (4). When (i = 2), Alice is interested in the cake represented by an array (4, 2). If Alice put her knife at height (4), the resulting cak

Tutorials

Codeforces Round 1101 (Div. 2) — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
376700818 kartik.kumar.190305 B May 30, 2026, 4:31 p.m. OK C# 13 TESTS 10 156 32768000
376697177 2970982 B May 30, 2026, 4:24 p.m. OK C++17 (GCC 7-32) TESTS 10 62 0
376713813 lokitpatidar B May 30, 2026, 6:56 p.m. OK C++17 (GCC 7-32) TESTS 10 78 0
376745416 qixin777 B May 31, 2026, 6:10 a.m. OK C++17 (GCC 7-32) TESTS 10 78 819200
376730307 shraddhasaha27 B May 31, 2026, 2:06 a.m. OK C++17 (GCC 7-32) TESTS 10 93 0
376729141 8Pavithra B May 31, 2026, 1:36 a.m. OK C++17 (GCC 7-32) TESTS 10 93 0
376713926 hash123 B May 30, 2026, 6:58 p.m. OK C++17 (GCC 7-32) TESTS 10 93 0
376711069 Tarun5371 B May 30, 2026, 6:30 p.m. OK C++17 (GCC 7-32) TESTS 10 93 0
376708931 anveeksh_rajput B May 30, 2026, 6:09 p.m. OK C++17 (GCC 7-32) TESTS 10 93 0
376705203 Manal_Patel_2557 B May 30, 2026, 5:31 p.m. OK C++17 (GCC 7-32) TESTS 10 93 0
376701746 ma3karona_blba4amil B May 30, 2026, 4:33 p.m. OK C++17 (GCC 7-32) TESTS 10 93 0
376721048 sugmapipe B May 30, 2026, 8:57 p.m. OK C++20 (GCC 13-64) TESTS 10 46 0
376723381 jovanyraafat5 B May 30, 2026, 9:51 p.m. OK C++20 (GCC 13-64) TESTS 10 46 102400
376707495 Lily_ B May 30, 2026, 5:54 p.m. OK C++20 (GCC 13-64) TESTS 10 46 102400
376745369 omar3bdelgaid B May 31, 2026, 6:09 a.m. OK C++20 (GCC 13-64) TESTS 10 62 0
376736039 Triple3 B May 31, 2026, 4:06 a.m. OK C++20 (GCC 13-64) TESTS 10 62 0
376726445 joaco-gavernet B May 30, 2026, 11:45 p.m. OK C++20 (GCC 13-64) TESTS 10 62 0
376724413 Imlevelingup B May 30, 2026, 10:25 p.m. OK C++20 (GCC 13-64) TESTS 10 62 0
376723648 naw0xff B May 30, 2026, 9:59 p.m. OK C++20 (GCC 13-64) TESTS 10 62 0
376722469 Gogee B May 30, 2026, 9:28 p.m. OK C++20 (GCC 13-64) TESTS 10 62 0
376722239 linkyless B May 30, 2026, 9:22 p.m. OK C++20 (GCC 13-64) TESTS 10 62 0
376719826 martinsemsem B May 30, 2026, 8:32 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
376695345 vetran_noob420 B May 30, 2026, 4:20 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
376709527 LingLuo_Official B May 30, 2026, 6:15 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 1024000
376745325 Continue90666 B May 31, 2026, 6:09 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 62 0
376745299 BigBruh B May 31, 2026, 6:09 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 62 0
376743390 Vishwa_Prajapati B May 31, 2026, 5:45 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 62 0
376743374 toollist B May 31, 2026, 5:45 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 62 0
376743076 sayeed.mahi B May 31, 2026, 5:41 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 62 0
376742971 Sakura1314lyc B May 31, 2026, 5:40 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 62 0
376742620 nurie B May 31, 2026, 5:35 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 62 0
376695400 AK191105 B May 30, 2026, 4:20 p.m. OK GNU C11 TESTS 10 46 1638400
376699335 Azula_the_fire_lord B May 30, 2026, 4:28 p.m. OK GNU C11 TESTS 10 93 102400
376695769 SPARKED_000 B May 30, 2026, 4:21 p.m. OK GNU C11 TESTS 10 875 1638400
376692451 Shiva_Ganesh B May 30, 2026, 4:13 p.m. OK GNU C11 TESTS 10 890 0
376698265 Manfred1023 B May 30, 2026, 4:26 p.m. OK GNU C11 TESTS 10 890 1638400
376695486 hiremejanestreet B May 30, 2026, 4:20 p.m. OK GNU C11 TESTS 10 906 0
376694080 prof.paradox B May 30, 2026, 4:17 p.m. OK GNU C11 TESTS 10 906 1536000
376695799 Sr.Sapo B May 30, 2026, 4:21 p.m. OK GNU C11 TESTS 10 906 1638400
376690733 divatforces B May 30, 2026, 4:10 p.m. OK GNU C11 TESTS 10 906 1638400
376709624 Ahmed_Mohamed_Al3adl B May 30, 2026, 6:16 p.m. OK GNU C11 TESTS 10 921 0
376704849 treasuryonly B May 30, 2026, 5:28 p.m. OK Haskell TESTS 10 171 5324800
376698246 kalesha-0911 B May 30, 2026, 4:26 p.m. OK Java 21 TESTS 10 171 512000
376691869 hasinichandana07 B May 30, 2026, 4:12 p.m. OK Java 21 TESTS 10 218 1228800
376711403 ArpitDhumane B May 30, 2026, 6:34 p.m. OK Java 21 TESTS 10 234 409600
376730425 oishiki22 B May 31, 2026, 2:08 a.m. OK Java 21 TESTS 10 234 512000
376711519 ArpitDhumane B May 30, 2026, 6:35 p.m. OK Java 21 TESTS 10 234 1024000
376693011 tanu10162005 B May 30, 2026, 4:15 p.m. OK Java 21 TESTS 10 265 1740800
376737880 jahnavi_s_ B May 31, 2026, 4:21 a.m. OK Java 21 TESTS 10 265 2355200
376694852 krishbhatia026 B May 30, 2026, 4:19 p.m. OK Java 21 TESTS 10 265 2662400
376691202 Kushagra8009 B May 30, 2026, 4:11 p.m. OK Java 21 TESTS 10 281 1228800
376739891 NanDemo B May 31, 2026, 4:56 a.m. OK Java 21 TESTS 10 281 5324800
376702067 krish_vodnala B May 30, 2026, 4:34 p.m. OK Java 8 TESTS 10 171 3584000
376694813 BabluD B May 30, 2026, 4:19 p.m. OK Java 8 TESTS 10 187 4505600
376695396 Yash_4a5h B May 30, 2026, 4:20 p.m. OK Java 8 TESTS 10 406 3891200
376696878 alokroydipun2004 B May 30, 2026, 4:23 p.m. OK Java 8 TESTS 10 437 3891200
376695087 Rishmore07 B May 30, 2026, 4:19 p.m. OK Java 8 TESTS 10 437 3891200
376689580 JONNADA_PAVAN B May 30, 2026, 4:07 p.m. OK Java 8 TESTS 10 515 3891200
376718121 desi_patola B May 30, 2026, 8:01 p.m. OK Java 8 TESTS 10 562 0
376689763 Riya1605 B May 30, 2026, 4:07 p.m. OK Java 8 TESTS 10 609 0
376742603 manavajk26 B May 31, 2026, 5:35 a.m. OK Java 8 TESTS 10 640 0
376692725 laxmancr B May 30, 2026, 4:14 p.m. OK JavaScript TESTS 10 203 39321600
376700293 Ujjwal.xyz B May 30, 2026, 4:31 p.m. OK Node.js TESTS 10 171 43212800
376690230 Pranay7_M B May 30, 2026, 4:09 p.m. OK PyPy 3 TESTS 10 421 20889600
376725831 rafaelguasselli B May 30, 2026, 11:20 p.m. OK PyPy 3 TESTS 10 468 20480000
376714126 EarthGo B May 30, 2026, 7:01 p.m. OK PyPy 3 TESTS 10 515 15974400
376744135 red_coder_nr25 B May 31, 2026, 5:54 a.m. OK PyPy 3 TESTS 10 531 18022400
376709065 esincos B May 30, 2026, 6:10 p.m. OK PyPy 3 TESTS 10 546 18534400
376744339 adikowa B May 31, 2026, 5:57 a.m. OK PyPy 3 TESTS 10 562 18124800
376699140 ujjwaladitya01 B May 30, 2026, 4:28 p.m. OK PyPy 3 TESTS 10 562 19660800
376707521 Alexnusbb B May 30, 2026, 5:55 p.m. OK PyPy 3 TESTS 10 687 27852800
376694749 AlexFst B May 30, 2026, 4:19 p.m. OK PyPy 3-64 TESTS 10 109 26931200
376723654 araujorafael9201 B May 30, 2026, 9:59 p.m. OK PyPy 3-64 TESTS 10 125 21504000
376734733 PG0cT537 B May 31, 2026, 3:40 a.m. OK PyPy 3-64 TESTS 10 125 26521600
376704944 akane646 B May 30, 2026, 5:29 p.m. OK PyPy 3-64 TESTS 10 125 26521600
376736079 ctrl--akshit B May 31, 2026, 4:07 a.m. OK PyPy 3-64 TESTS 10 125 26931200
376716706 vinee. B May 30, 2026, 7:38 p.m. OK PyPy 3-64 TESTS 10 125 26931200
376712520 MuhammadQasim B May 30, 2026, 6:48 p.m. OK PyPy 3-64 TESTS 10 125 27238400
376695450 axan0_0 B May 30, 2026, 4:20 p.m. OK PyPy 3-64 TESTS 10 125 27955200
376692737 bbadrizzy B May 30, 2026, 4:14 p.m. OK PyPy 3-64 TESTS 10 125 28876800
376718227 hyp-yaml B May 30, 2026, 8:02 p.m. OK PyPy 3-64 TESTS 10 125 29388800
376690427 donemanPro B May 30, 2026, 4:09 p.m. OK Python 3 TESTS 10 156 28876800
376719830 znar B May 30, 2026, 8:32 p.m. OK Python 3 TESTS 10 171 28876800
376709299 dip789 B May 30, 2026, 6:13 p.m. OK Python 3 TESTS 10 171 41881600
376694682 callme8samay B May 30, 2026, 4:19 p.m. OK Python 3 TESTS 10 187 33996800
376694503 ramu_anantha B May 30, 2026, 4:18 p.m. OK Python 3 TESTS 10 218 28876800
376699771 Limit-DNE B May 30, 2026, 4:29 p.m. OK Python 3 TESTS 10 218 37990400
376724135 shivanshkansal19 B May 30, 2026, 10:15 p.m. OK Python 3 TESTS 10 234 29286400
376717169 bharathj21 B May 30, 2026, 7:45 p.m. OK Python 3 TESTS 10 250 28876800
376698300 cheburascha01 B May 30, 2026, 4:26 p.m. OK Python 3 TESTS 10 250 29286400
376723261 ialissonroque10 B May 30, 2026, 9:48 p.m. OK Python 3 TESTS 10 250 42803200
376706760 Tantellam B May 30, 2026, 5:47 p.m. OK Rust 2024 TESTS 10 62 14028800
376727688 CoHHa9_MyXa B May 31, 2026, 12:42 a.m. OK Rust 2024 TESTS 10 62 14643200

remove filters

Back to search problems