Codeforces Round 691 (Div. 1)

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
1458 Codeforces Round 691 (Div. 1) FINISHED False 7200 123452699 Dec. 19, 2020, 9:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3576 ) B Glass Half Spilled PROGRAMMING dp

B"There are n glasses on the table numbered 1, ldots, n . The glass i can hold up to a_i units of water, and currently contains b_i units of water. You would like to choose k glasses and collect as much water in them as possible. To that effect you can pour water from one glass to another as many times as you like. However, because of the glasses' awkward shape (and totally unrelated to your natural clumsiness), each time you try to transfer any amount of water, half of the amount is spilled on the floor. Formally, suppose a glass i currently contains c_i units of water, and a glass j contains c_j units of water. Suppose you try to transfer x units from glass i to glass j (naturally, x can not exceed c_i ). Then, x / 2 units is spilled on the floor. After the transfer is done, the glass i will contain c_i - x units, and the glass j will contain min(a_j, c_j + x / 2) units (excess water that doesn't fit in the glass is also spilled). Each time you transfer water, you can arbitrarlly choose from which glass i to which glass j to pour, and also the amount x transferred can be any positive real number. For each k = 1, ldots, n , determine the largest possible total amount of water that can be collected in arbitrarily chosen k glasses after transferring water between glasses zero or more times. The first line contains a single integer n ( 1 <= q n <= q 100 ) -- the number of glasses. The following n lines describe the glasses. The i -th of these lines contains two integers a_i and b_i ( 0 <= q b_i <= q a_i <= q 100 , a_i > 0 ) -- capacity, and water amount currently contained for the glass i , respectively. Print n real numbers -- the largest amount of water that can be collected in 1, ldots, n glasses respectively. Your answer will be accepted if eac"...

Tutorials

Codeforces Round #691 Editorial (finished)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
101735093 Gassa B Dec. 19, 2020, 10:06 a.m. OK D TESTS 18 390 4198400
101727157 BigBag B Dec. 19, 2020, 9:50 a.m. OK GNU C++11 TESTS 18 31 4505600
101744269 HanZhongBalls B Dec. 19, 2020, 10:31 a.m. OK GNU C++11 TESTS 18 31 4608000
101723637 Isonan B Dec. 19, 2020, 9:44 a.m. OK GNU C++11 TESTS 18 46 3891200
101733853 MrMirotic B Dec. 19, 2020, 10:03 a.m. OK GNU C++11 TESTS 18 46 4096000
101783972 psycho437 B Dec. 19, 2020, 3:47 p.m. OK GNU C++11 TESTS 19 46 4096000
101811657 zknpy B Dec. 20, 2020, 1:38 a.m. OK GNU C++11 TESTS 19 46 4096000
101727970 paleprince B Dec. 19, 2020, 9:51 a.m. OK GNU C++11 TESTS 18 46 4198400
101738479 OMG_wc B Dec. 19, 2020, 10:15 a.m. OK GNU C++11 TESTS 18 46 4198400
101729017 faebdc B Dec. 19, 2020, 9:53 a.m. OK GNU C++11 TESTS 18 46 4198400
101743721 Hoshimi B Dec. 19, 2020, 10:29 a.m. OK GNU C++11 TESTS 18 46 4198400
101734536 flyFeather B Dec. 19, 2020, 10:05 a.m. OK GNU C++14 TESTS 18 46 4198400
101742687 Scut82 B Dec. 19, 2020, 10:26 a.m. OK GNU C++14 TESTS 18 46 4505600
101735986 hzt1 B Dec. 19, 2020, 10:09 a.m. OK GNU C++14 TESTS 18 46 4608000
101738925 antguz B Dec. 19, 2020, 10:16 a.m. OK GNU C++14 TESTS 18 46 5120000
101738198 zjjcth330 B Dec. 19, 2020, 10:14 a.m. OK GNU C++14 TESTS 18 46 5836800
101815885 duchung B Dec. 20, 2020, 4:10 a.m. OK GNU C++14 TESTS 19 46 8396800
101761802 jjikkollp B Dec. 19, 2020, 11:23 a.m. OK GNU C++14 TESTS 18 46 9932800
101791668 QDEZ604 B Dec. 19, 2020, 5:19 p.m. OK GNU C++14 TESTS 19 61 4198400
101740984 Prof_BL B Dec. 19, 2020, 10:21 a.m. OK GNU C++14 TESTS 18 61 5120000
101724112 hank55663 B Dec. 19, 2020, 9:45 a.m. OK GNU C++14 TESTS 18 62 4198400
101738927 b2563125 B Dec. 19, 2020, 10:16 a.m. OK GNU C++17 TESTS 18 46 2048000
101729722 tfg B Dec. 19, 2020, 9:54 a.m. OK GNU C++17 TESTS 18 46 4096000
101727608 chokottodake B Dec. 19, 2020, 9:50 a.m. OK GNU C++17 TESTS 18 46 4096000
101745179 aquablaze B Dec. 19, 2020, 10:33 a.m. OK GNU C++17 TESTS 18 46 4096000
101743960 ekaerovets B Dec. 19, 2020, 10:30 a.m. OK GNU C++17 TESTS 18 46 4096000
101737350 Lawali B Dec. 19, 2020, 10:12 a.m. OK GNU C++17 TESTS 18 46 4096000
101735965 _h_ B Dec. 19, 2020, 10:09 a.m. OK GNU C++17 TESTS 18 46 4096000
101730858 SirShokoladina B Dec. 19, 2020, 9:57 a.m. OK GNU C++17 TESTS 18 46 4096000
101730317 ikatanic B Dec. 19, 2020, 9:56 a.m. OK GNU C++17 TESTS 18 46 4096000
101727620 kmjp B Dec. 19, 2020, 9:50 a.m. OK GNU C++17 TESTS 18 46 4096000
101742360 johnathan79717 B Dec. 19, 2020, 10:25 a.m. OK GNU C++17 (64) TESTS 18 31 4198400
101744188 emthrm B Dec. 19, 2020, 10:30 a.m. OK GNU C++17 (64) TESTS 18 46 1638400
101736206 kotatsugame B Dec. 19, 2020, 10:09 a.m. OK GNU C++17 (64) TESTS 18 46 3993600
101738957 mtsd B Dec. 19, 2020, 10:16 a.m. OK GNU C++17 (64) TESTS 18 46 4096000
101735788 Changyu B Dec. 19, 2020, 10:08 a.m. OK GNU C++17 (64) TESTS 18 46 4096000
101781873 ecnerwala B Dec. 19, 2020, 3:16 p.m. OK GNU C++17 (64) TESTS 19 46 4096000
101773262 chen_nuo B Dec. 19, 2020, 1:04 p.m. OK GNU C++17 (64) TESTS 19 46 4096000
101728732 tourist B Dec. 19, 2020, 9:52 a.m. OK GNU C++17 (64) TESTS 18 46 4198400
101738599 qdd B Dec. 19, 2020, 10:15 a.m. OK GNU C++17 (64) TESTS 18 46 4198400
101731314 natsugiri B Dec. 19, 2020, 9:58 a.m. OK GNU C++17 (64) TESTS 18 46 4505600
101731276 uwi B Dec. 19, 2020, 9:58 a.m. OK Java 11 TESTS 18 311 0
101731803 cirno3153 B Dec. 19, 2020, 9:59 a.m. OK Java 11 TESTS 18 420 5734400
101737481 mikit B Dec. 19, 2020, 10:12 a.m. OK Java 11 TESTS 18 1871 479027200
101735068 iakovlev.zakhar B Dec. 19, 2020, 10:06 a.m. OK Java 8 TESTS 18 264 0
101744249 DarLam B Dec. 19, 2020, 10:30 a.m. OK Java 8 TESTS 18 358 0
101765264 BNL B Dec. 19, 2020, 11:32 a.m. OK Java 8 TESTS 18 374 0
101746438 pulkit1411 B Dec. 19, 2020, 10:37 a.m. OK Java 8 TESTS 18 421 36864000
101729385 dalt B Dec. 19, 2020, 9:54 a.m. OK Java 8 TESTS 18 670 5939200
101771006 Spheniscine B Dec. 19, 2020, 12:41 p.m. OK Kotlin TESTS 18 233 2355200
101730316 JSoap B Dec. 19, 2020, 9:56 a.m. OK Kotlin TESTS 18 295 512000
101745804 Musin B Dec. 19, 2020, 10:35 a.m. OK Kotlin TESTS 18 326 0
101746395 Spheniscine B Dec. 19, 2020, 10:37 a.m. OK Kotlin TESTS 18 389 9728000
101727133 LoneFox B Dec. 19, 2020, 9:50 a.m. OK MS C++ TESTS 18 1559 323891200
101733129 pichulia B Dec. 19, 2020, 10:02 a.m. OK MS C++ 2017 TESTS 18 93 18432000
101762885 vpike B Dec. 19, 2020, 11:26 a.m. OK MS C++ 2017 TESTS 18 296 16179200
101757854 terry_u16 B Dec. 19, 2020, 11:11 a.m. OK .NET Core C# TESTS 18 171 24985600
101748597 EmK B Dec. 19, 2020, 10:43 a.m. OK .NET Core C# TESTS 18 296 4710400
101765204 titia B Dec. 19, 2020, 11:32 a.m. OK PyPy 3 TESTS 18 326 7270400
101749657 mkawa2 B Dec. 19, 2020, 10:46 a.m. OK PyPy 3 TESTS 18 327 71372800
101747106 yuusanlondon B Dec. 19, 2020, 10:39 a.m. OK PyPy 3 TESTS 18 483 18841600
101796294 ulyss B Dec. 19, 2020, 6:19 p.m. OK PyPy 3 TESTS 19 514 18841600
101809508 jimm89 B Dec. 19, 2020, 11:59 p.m. OK PyPy 3 TESTS 19 888 18739200
101735674 tamato B Dec. 19, 2020, 10:08 a.m. OK PyPy 3 TESTS 18 1403 51302400
101760161 conqueror_of_tourist B Dec. 19, 2020, 11:18 a.m. OK PyPy 3 TESTS 18 1419 12185600
101782711 at_f B Dec. 19, 2020, 3:29 p.m. OK PyPy 3 TESTS 19 1794 33280000
101729234 sansen B Dec. 19, 2020, 9:53 a.m. OK Rust TESTS 18 779 8806400

remove filters

Back to search problems