EPIC Institute of Technology Round Summer 2025 (Codeforces Round 1036, Div. 1 + 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
2124 EPIC Institute of Technology Round Summer 2025 (Codeforces Round 1036, Div. 1 + Div. 2) FINISHED False 10800 24593123 July 6, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 296 ) G Maximise Sum PROGRAMMING binary search data structures

This problem differs from problem B. In this problem, you must output the maximum sum of prefix minimums over all operations that cost at least (x) for each integer (x) from (0) to (n-1). You are given an array (a) of length (n), with elements satisfying (\boldsymbol{0 \le a_i \le n}). You can perform the following operation at most once : Choose two indices (i) and (j) such that (i < j). Set (a_i := a_i + a_j). Then, set (a_j = 0). Let the cost of one operation be the value of (j-i). The cost of not performing an operation is (0). For each integer (x) from (0) to (n-1) inclusive, output the maximum possible value of (\min(a_1) + \min(a_1,a_2) + \ldots + \min(a_1, a_2, \ldots, a_n)) over all possible operations that have a cost of at least (x). 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 10^6)) — the length of (a). The following line contains (n) space-separated integers (a_1, a_2, \ldots, a_n) ((0 \le a_i \le n)) — denoting the array (a). It is guaranteed that the sum of (n) over all test cases does not exceed (10^6). For each test case, output (n) integers on a new line: the (i)-th integer denoting the maximum answer over all operations that have a cost of at least (i-1). Let's analyze the fifth test case: (x=0,1,2): the optimal operation is (i=2) and (j=4), which has a cost of (2). The array (a) becomes (4,4,3,0,1), which has a score of (11). (x=3): the optimal operation is (i=2) and (j=5), which has a cost of (3). The array (a) becomes (4,2,3,3,0), which has a score of (10). (x=4): the optimal (and only) operation is (i=1) and (j=5), which has a cost of (4). The ar

Tutorials

EPIC Institute of Technology Round Summer 2025 (Codeforces Round 1036, Div. 1 + Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
327870839 ugayush360 G July 7, 2025, 5:11 a.m. OK C++17 (GCC 7-32) TESTS 46 531 32153600
327822569 taeyeon_ss G July 6, 2025, 5:25 p.m. OK C++17 (GCC 7-32) TESTS 46 702 109260800
327876552 surajbhan99 G July 7, 2025, 5:56 a.m. OK C++17 (GCC 7-32) TESTS 46 718 47104000
327824885 RanRankeainie G July 6, 2025, 5:33 p.m. OK C++20 (GCC 13-64) TESTS 46 421 36147200
327833225 _wrz_ G July 6, 2025, 7:09 p.m. OK C++20 (GCC 13-64) TESTS 46 546 159436800
327841906 Nagisa-Furukawa G July 6, 2025, 8:55 p.m. OK C++20 (GCC 13-64) TESTS 46 781 71475200
327818151 tourist G July 6, 2025, 5:09 p.m. OK C++20 (GCC 13-64) TESTS 46 952 81817600
327821816 bashkort G July 6, 2025, 5:22 p.m. OK C++20 (GCC 13-64) TESTS 46 1000 358707200
327817743 kotatsugame G July 6, 2025, 5:07 p.m. OK C++20 (GCC 13-64) TESTS 46 1280 83660800
327841995 Radewoosh G July 6, 2025, 8:57 p.m. OK C++20 (GCC 13-64) TESTS 46 1500 223027200
327854911 cozycompiler G July 7, 2025, 1:59 a.m. OK C++20 (GCC 13-64) TESTS 46 1593 338739200
327812488 Rubikun G July 6, 2025, 4:49 p.m. OK C++20 (GCC 13-64) TESTS 46 1734 138035200
327867410 furry G July 7, 2025, 4:43 a.m. OK C++23 (GCC 14-64, msys2) TESTS 46 202 47308800
327834664 ecnerwala G July 6, 2025, 7:21 p.m. OK C++23 (GCC 14-64, msys2) TESTS 46 296 28569600
327821965 zeemanz G July 6, 2025, 5:23 p.m. OK C++23 (GCC 14-64, msys2) TESTS 46 374 45875200
327843536 maro_7atem365 G July 6, 2025, 9:25 p.m. OK C++23 (GCC 14-64, msys2) TESTS 46 421 68608000
327833797 Mangooste G July 6, 2025, 7:14 p.m. OK C++23 (GCC 14-64, msys2) TESTS 46 484 29798400
327849045 tkacper G July 6, 2025, 11:47 p.m. OK C++23 (GCC 14-64, msys2) TESTS 46 592 82124800
327816622 abc864197532 G July 6, 2025, 5:03 p.m. OK C++23 (GCC 14-64, msys2) TESTS 46 687 127590400
327817545 SomethingNew G July 6, 2025, 5:07 p.m. OK C++23 (GCC 14-64, msys2) TESTS 46 718 139468800
327837260 ksun48 G July 6, 2025, 7:49 p.m. OK C++23 (GCC 14-64, msys2) TESTS 46 749 47001600
327825279 BurnedChicken G July 6, 2025, 5:34 p.m. OK C++23 (GCC 14-64, msys2) TESTS 46 874 88780800
327814511 Maksim1744 G July 6, 2025, 4:56 p.m. OK Rust 2021 TESTS 46 296 79974400

remove filters

Back to search problems