Educational Codeforces Round 145 (Rated for 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
1809 Educational Codeforces Round 145 (Rated for Div. 2) FINISHED False 7200 52241099 March 23, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 853 ) E Two Tanks PROGRAMMING binary search dp implementation math

B"There are two water tanks, the first one fits a liters of water, the second one fits b liters of water. The first tank has c ( 0 <= c <= a ) liters of water initially, the second tank has d ( 0 <= d <= b ) liters of water initially. You want to perform n operations on them. The i -th operation is specified by a single non-zero integer v_i . If v_i > 0 , then you try to pour v_i liters of water from the first tank into the second one. If v_i < 0 , you try to pour -v_i liters of water from the second tank to the first one. When you try to pour x liters of water from the tank that has y liters currently available to the tank that can fit z more liters of water, the operation only moves min(x, y, z) liters of water. For all pairs of the initial volumes of water (c, d) such that 0 <= c <= a and 0 <= d <= b , calculate the volume of water in the first tank after all operations are performed. The first line contains three integers n, a and b ( 1 <= n <= 10^4 ; 1 <= a, b <= 1000 ) -- the number of operations and the capacities of the tanks, respectively. The second line contains n integers v_1, v_2, ... , v_n ( -1000 <= v_i <= 1000 ; v_i neq 0 ) -- the volume of water you try to pour in each operation. For all pairs of the initial volumes of water (c, d) such that 0 <= c <= a and 0 <= d <= b , calculate the volume of water in the first tank after all operations are performed. Print a + 1 lines, each line should contain b + 1 integers. The j -th value in the i -th line should be equal to the answer for c = i - 1 and d = j - 1 . Consider c = 3 and d = 2 from the first example: There's 1 liter of water in the first tank at the end. Thus, the third value in the fourth row is 1 . "...

Tutorials

114300

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
198836114 Tdyx E March 23, 2023, 5:08 p.m. OK C# 10 TESTS 52 249 60416000
198828196 LeonidR E March 23, 2023, 4:34 p.m. OK C# 10 TESTS 52 296 26726400
198878360 mban259 E March 24, 2023, 12:36 a.m. OK C# 10 TESTS 52 1778 13721600
198880749 LXH-cat E March 24, 2023, 1:24 a.m. OK GNU C++14 TESTS 52 156 4096000
198826860 Kaitokid E March 23, 2023, 4:32 p.m. OK GNU C++14 TESTS 52 187 16896000
198886016 Lucas_SCU E March 24, 2023, 3:17 a.m. OK GNU C++14 TESTS 52 202 4096000
198882941 gzchenben E March 24, 2023, 2:12 a.m. OK GNU C++14 TESTS 52 202 4096000
198882276 Xu_Hongxi E March 24, 2023, 1:58 a.m. OK GNU C++14 TESTS 52 202 4096000
198830268 lamduybao03 E March 23, 2023, 4:40 p.m. OK GNU C++14 TESTS 52 545 8806400
198827809 Raiden_Ei_ E March 23, 2023, 4:33 p.m. OK GNU C++14 TESTS 52 685 4096000
198886548 Knowledge_LLZ E March 24, 2023, 3:26 a.m. OK GNU C++17 TESTS 52 155 819200
198896941 zja601 E March 24, 2023, 5:56 a.m. OK GNU C++17 TESTS 52 171 4300800
198885121 zft_4995 E March 24, 2023, 3 a.m. OK GNU C++17 TESTS 52 171 4915200
198841012 wyyxhjth E March 23, 2023, 5:37 p.m. OK GNU C++17 TESTS 52 186 4096000
198832871 Yae_Sakura E March 23, 2023, 4:51 p.m. OK GNU C++17 TESTS 52 187 15155200
198840125 Lihecen1234 E March 23, 2023, 5:31 p.m. OK GNU C++17 TESTS 52 202 102400
198843793 chen_zexing E March 23, 2023, 5:56 p.m. OK GNU C++17 TESTS 52 233 4096000
198830158 LittleFall E March 23, 2023, 4:39 p.m. OK GNU C++17 TESTS 52 249 4300800
198829836 patou E March 23, 2023, 4:38 p.m. OK GNU C++17 TESTS 52 249 4608000
198832434 Yakumo_Ran E March 23, 2023, 4:49 p.m. OK GNU C++17 TESTS 52 249 16281600
198837600 huangxiaohua E March 23, 2023, 5:16 p.m. OK GNU C++17 (64) TESTS 52 124 0
198837311 huangxiaohua E March 23, 2023, 5:15 p.m. OK GNU C++17 (64) TESTS 52 124 0
198894057 Once_I_Liked_AGirl E March 24, 2023, 5:21 a.m. OK GNU C++17 (64) TESTS 52 140 4505600
198837244 huangxiaohua E March 23, 2023, 5:15 p.m. OK GNU C++17 (64) TESTS 52 155 0
198885856 juliany2 E March 24, 2023, 3:14 a.m. OK GNU C++17 (64) TESTS 52 186 4096000
198883906 enslaved E March 24, 2023, 2:34 a.m. OK GNU C++17 (64) TESTS 52 186 4608000
198843614 nicksms E March 23, 2023, 5:55 p.m. OK GNU C++17 (64) TESTS 52 187 9728000
198832988 KKT_89 E March 23, 2023, 4:52 p.m. OK GNU C++17 (64) TESTS 52 202 4505600
198844891 minato E March 23, 2023, 6:04 p.m. OK GNU C++17 (64) TESTS 52 218 4505600
198825550 MateoCV E March 23, 2023, 4:29 p.m. OK GNU C++17 (64) TESTS 52 233 8294400

remove filters

Back to search problems