Hello 2024

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
1919 Hello 2024 FINISHED False 9000 71853923 Jan. 6, 2024, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 2575 ) F1 Wine Factory (Easy Version) PROGRAMMING data structures flows schedules trees 2300

This is the easy version of the problem. The only difference between the two versions is the constraint on (c_i) and (z). You can make hacks only if both versions of the problem are solved. There are three arrays (a), (b) and (c). (a) and (b) have length (n) and (c) has length (n-1). Let (W(a,b,c)) denote the liters of wine created from the following process. Create (n) water towers. The (i)-th water tower initially has (a_i) liters of water and has a wizard with power (b_i) in front of it. Furthermore, for each (1 \le i \le n - 1), there is a valve connecting water tower (i) to (i + 1) with capacity (c_i). For each (i) from (1) to (n) in this order, the following happens: The wizard in front of water tower (i) removes at most (b_i) liters of water from the tower and turns the removed water into wine. If (i \neq n), at most (c_i) liters of the remaining water left in water tower (i) flows through the valve into water tower (i + 1). There are (q) updates. In each update, you will be given integers (p), (x), (y) and (z) and you will update (a_p := x), (b_p := y) and (c_p := z). After each update, find the value of (W(a,b,c)). Note that previous updates to arrays (a), (b) and (c) persist throughout future updates. The first line contains two integers (n) and (q) ((2 \le n \le 5\cdot 10^5), (1 \le q \le 5\cdot 10^5)) — the number of water towers and the number of updates. The second line contains (n) integers (a_1, a_2, \ldots, a_n) ((0 \le a_i \le 10^9)) — the number of liters of water in water tower (i). The third line contains (n) integers (b_1, b_2, \ldots, b_n) ((0 \le b_i \le 10^9)) — the power of the wizard in front of water tower (i). The fourth line contains (n - 1) integers (c_1, c_2, \ldots, c_{n - 1}) ((c_i \color{red}{=} 10^{18}))

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
240613416 Gorithow F1 Jan. 6, 2024, 7:45 p.m. OK C# 10 TESTS 45 3774 194150400 2300
240629983 Rigel__ F1 Jan. 7, 2024, 2:21 a.m. OK GNU C++14 TESTS 45 1574 72192000 2300
240591850 dancho F1 Jan. 6, 2024, 4:49 p.m. OK GNU C++14 TESTS 45 1622 92467200 2300
240595241 MMYYFF F1 Jan. 6, 2024, 4:58 p.m. OK GNU C++14 TESTS 45 1637 60108800 2300
240596307 mat_v F1 Jan. 6, 2024, 5:01 p.m. OK GNU C++14 TESTS 45 1699 40140800 2300
240601904 scallionsong F1 Jan. 6, 2024, 5:55 p.m. OK GNU C++14 TESTS 45 1716 60108800 2300
240596028 Jimanbanashi F1 Jan. 6, 2024, 5 p.m. OK GNU C++14 TESTS 45 1731 41574400 2300
240609616 buko F1 Jan. 6, 2024, 6:59 p.m. OK GNU C++14 TESTS 45 1777 29286400 2300
240638946 paul2008 F1 Jan. 7, 2024, 5:07 a.m. OK GNU C++14 TESTS 45 1777 80179200 2300
240594635 yb13558h F1 Jan. 6, 2024, 4:56 p.m. OK GNU C++14 TESTS 45 1778 79564800 2300
240629828 bdfs_then_CSDN F1 Jan. 7, 2024, 2:18 a.m. OK GNU C++14 TESTS 45 1793 96153600 2300
240590546 zjjwsws F1 Jan. 6, 2024, 4:45 p.m. OK GNU C++17 TESTS 45 732 72294400 2300
240631403 zrkcdd F1 Jan. 7, 2024, 2:53 a.m. OK GNU C++17 TESTS 45 1403 49254400 2300
240608295 OMG_wc F1 Jan. 6, 2024, 6:46 p.m. OK GNU C++17 TESTS 45 1482 52121600 2300
240608579 OMG_wc F1 Jan. 6, 2024, 6:49 p.m. OK GNU C++17 TESTS 45 1544 52121600 2300
240635014 Linx F1 Jan. 7, 2024, 4:04 a.m. OK GNU C++17 TESTS 45 1559 60108800 2300
240591138 n0sk1ll F1 Jan. 6, 2024, 4:47 p.m. OK GNU C++17 TESTS 45 1622 34713600 2300
240603695 KamishirasawaKeine F1 Jan. 6, 2024, 6:05 p.m. OK GNU C++17 TESTS 45 1653 72192000 2300
240589769 johnathan79717 F1 Jan. 6, 2024, 4:43 p.m. OK GNU C++17 TESTS 45 1668 39526400 2300
240594537 JeffreyLC F1 Jan. 6, 2024, 4:56 p.m. OK GNU C++17 TESTS 45 1699 42086400 2300
240613785 OverRancid F1 Jan. 6, 2024, 7:50 p.m. OK GNU C++17 TESTS 45 1716 49254400 2300
240633174 drdilyor F1 Jan. 7, 2024, 3:29 a.m. OK GNU C++17 (64) TESTS 45 358 33484800 2300
240632765 zjjws F1 Jan. 7, 2024, 3:21 a.m. OK GNU C++17 (64) TESTS 45 623 72294400 2300
240635548 drdilyor F1 Jan. 7, 2024, 4:15 a.m. OK GNU C++17 (64) TESTS 45 935 33280000 2300
240632770 drdilyor F1 Jan. 7, 2024, 3:21 a.m. OK GNU C++17 (64) TESTS 45 967 33280000 2300
240634654 drdilyor F1 Jan. 7, 2024, 3:58 a.m. OK GNU C++17 (64) TESTS 45 982 33280000 2300
240633275 drdilyor F1 Jan. 7, 2024, 3:31 a.m. OK GNU C++17 (64) TESTS 45 982 33280000 2300
240632827 drdilyor F1 Jan. 7, 2024, 3:22 a.m. OK GNU C++17 (64) TESTS 45 982 33280000 2300
240632757 drdilyor F1 Jan. 7, 2024, 3:21 a.m. OK GNU C++17 (64) TESTS 45 982 33280000 2300
240606339 drdilyor F1 Jan. 6, 2024, 6:26 p.m. OK GNU C++17 (64) TESTS 45 982 40140800 2300
240632800 drdilyor F1 Jan. 7, 2024, 3:22 a.m. OK GNU C++17 (64) TESTS 45 997 33280000 2300
240616960 tiom4eg F1 Jan. 6, 2024, 8:34 p.m. OK GNU C++20 (64) TESTS 45 420 45670400 2300
240592988 Sol1 F1 Jan. 6, 2024, 4:52 p.m. OK GNU C++20 (64) TESTS 45 482 74240000 2300
240600644 nekoyukino F1 Jan. 6, 2024, 5:51 p.m. OK GNU C++20 (64) TESTS 45 514 58265600 2300
240597205 Richard1211 F1 Jan. 6, 2024, 5:03 p.m. OK GNU C++20 (64) TESTS 45 545 110284800 2300
240592451 Prismriver F1 Jan. 6, 2024, 4:50 p.m. OK GNU C++20 (64) TESTS 45 639 58060800 2300
240619703 emorgan F1 Jan. 6, 2024, 9:22 p.m. OK GNU C++20 (64) TESTS 45 717 37273600 2300
240606917 heavenly_ F1 Jan. 6, 2024, 6:32 p.m. OK GNU C++20 (64) TESTS 45 763 45260800 2300
240596865 maxplus F1 Jan. 6, 2024, 5:02 p.m. OK GNU C++20 (64) TESTS 45 764 18432000 2300
240594686 minato F1 Jan. 6, 2024, 4:56 p.m. OK GNU C++20 (64) TESTS 45 764 36864000 2300
240632040 CodigoL F1 Jan. 7, 2024, 3:06 a.m. OK GNU C++20 (64) TESTS 45 764 37273600 2300
240604032 DarLam F1 Jan. 6, 2024, 6:08 p.m. OK Java 11 TESTS 45 2417 104140800 2300
240591284 knightL F1 Jan. 6, 2024, 4:47 p.m. OK Java 17 TESTS 45 1590 86528000 2300
240596139 invincible777 F1 Jan. 6, 2024, 5 p.m. OK Java 8 TESTS 45 2183 138547200 2300
240633680 Dhruvin_Savla F1 Jan. 7, 2024, 3:38 a.m. OK Java 8 TESTS 45 2620 117350400 2300
240590097 SecondThread F1 Jan. 6, 2024, 4:44 p.m. OK Java 8 TESTS 45 3291 224256000 2300
240594088 alexey.enkov F1 Jan. 6, 2024, 4:55 p.m. OK Kotlin 1.7 TESTS 45 3821 462540800 2300
240608621 OMG_wc F1 Jan. 6, 2024, 6:49 p.m. OK MS C++ 2017 TESTS 45 1637 52121600 2300
240602540 aPNJ777 F1 Jan. 6, 2024, 5:58 p.m. OK PyPy 3-64 TESTS 45 2589 129126400 2300
240613118 huntercf F1 Jan. 6, 2024, 7:41 p.m. OK PyPy 3-64 TESTS 45 4835 200089600 2300
240593947 xxh1999 F1 Jan. 6, 2024, 4:54 p.m. OK PyPy 3-64 TESTS 45 4835 200089600 2300
240600881 Spheniscine F1 Jan. 6, 2024, 5:51 p.m. OK Rust 2021 TESTS 45 1309 58265600 2300

remove filters

Back to search problems