Educational Codeforces Round 96 (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
1430 Educational Codeforces Round 96 (Rated for Div. 2) FINISHED False 7200 129416099 Oct. 11, 2020, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19426 ) B Barrels PROGRAMMING greedy implementation sortings

B"You have n barrels lined up in a row, numbered from left to right from one. Initially, the i -th barrel contains a_i liters of water. You can pour water from one barrel to another. In one act of pouring, you can choose two different barrels x and y (the x -th barrel shouldn't be empty) and pour any possible amount of water from barrel x to barrel y (possibly, all water). You may assume that barrels have infinite capacity, so you can pour any amount of water in each of them. Calculate the maximum possible difference between the maximum and the minimum amount of water in the barrels, if you can pour water at most k times. Some examples: The first line contains one integer t ( 1 <= t <= 1000 ) -- the number of test cases. The first line of each test case contains two integers n and k ( 1 <= k < n <= 2 cdot 10^5 ) -- the number of barrels and the number of pourings you can make. The second line contains n integers a_1, a_2, ... , a_n ( 0 <= a_i <= 10^{9} ), where a_i is the initial amount of water the i -th barrel has. It's guaranteed that the total sum of n over test cases doesn't exceed 2 cdot 10^5 . For each test case, print the maximum possible difference between the maximum and the minimum amount of water in the barrels, if you can pour water at most k times. "...

Tutorials

Educational Codeforces Round 96 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
95296423 AlpacanChicken B Oct. 11, 2020, 7:37 p.m. OK GNU C11 TESTS 14 61 1638400
95284438 ashishsah51 B Oct. 11, 2020, 4:36 p.m. OK GNU C11 TESTS 14 77 819200
95291760 chowdhuryshashwoto B Oct. 11, 2020, 6:10 p.m. OK GNU C11 TESTS 14 78 1638400
95305765 CTP_314 B Oct. 12, 2020, 1:16 a.m. OK GNU C++11 TESTS 14 31 819200
95306917 fr200110217102 B Oct. 12, 2020, 2:01 a.m. OK GNU C++11 TESTS 14 31 819200
95260332 Lu_Anlai B Oct. 11, 2020, 12:23 p.m. OK GNU C++11 TESTS 14 31 921600
95305814 luogu_bot4 B Oct. 12, 2020, 1:17 a.m. OK GNU C++11 TESTS 14 31 3686400
95279831 isLXa B Oct. 11, 2020, 3:38 p.m. OK GNU C++11 TESTS 14 46 819200
95305124 vectorwyx B Oct. 12, 2020, 12:45 a.m. OK GNU C++11 TESTS 14 46 819200
95310834 Snpilola B Oct. 12, 2020, 3:58 a.m. OK GNU C++11 TESTS 14 46 819200
95303878 Jay142753869 B Oct. 11, 2020, 11:38 p.m. OK GNU C++11 TESTS 14 46 1638400
95312154 ljfty B Oct. 12, 2020, 4:33 a.m. OK GNU C++11 TESTS 14 46 1638400
95304242 Zechariah_2001 B Oct. 11, 2020, 11:57 p.m. OK GNU C++11 TESTS 14 46 1638400
95305374 ..vince B Oct. 12, 2020, 12:57 a.m. OK GNU C++14 TESTS 14 61 819200
95268802 way_to_coding B Oct. 11, 2020, 2:04 p.m. OK GNU C++14 TESTS 14 61 819200
95280539 shreyasbalakrishna19 B Oct. 11, 2020, 3:47 p.m. OK GNU C++14 TESTS 14 61 1638400
95281653 Luka B Oct. 11, 2020, 4:01 p.m. OK GNU C++14 TESTS 14 62 819200
95270195 Abdelfattah_Mohamed B Oct. 11, 2020, 2:22 p.m. OK GNU C++14 TESTS 14 62 819200
95292985 Johnny23 B Oct. 11, 2020, 6:31 p.m. OK GNU C++14 TESTS 14 62 819200
95300524 SRIKANTH B Oct. 11, 2020, 9:18 p.m. OK GNU C++14 TESTS 14 62 819200
95262011 vishnugupt B Oct. 11, 2020, 12:43 p.m. OK GNU C++14 TESTS 14 62 1638400
95309317 deepesh162 B Oct. 12, 2020, 3:15 a.m. OK GNU C++14 TESTS 14 62 1638400
95265461 PoPularPlusPlus B Oct. 11, 2020, 1:23 p.m. OK GNU C++14 TESTS 14 62 1638400
95275665 certainly_not_an_alt B Oct. 11, 2020, 2:44 p.m. OK GNU C++17 TESTS 14 46 1740800
95294683 kaustubh.p16 B Oct. 11, 2020, 7:01 p.m. OK GNU C++17 TESTS 14 62 819200
95310282 Error--404 B Oct. 12, 2020, 3:42 a.m. OK GNU C++17 TESTS 14 62 819200
95308622 Sorry_I_do_not_Know B Oct. 12, 2020, 2:56 a.m. OK GNU C++17 TESTS 14 62 819200
95296626 Siddharth2020 B Oct. 11, 2020, 7:41 p.m. OK GNU C++17 TESTS 14 62 819200
95288743 PedroAlmeida B Oct. 11, 2020, 5:23 p.m. OK GNU C++17 TESTS 14 62 819200
95267477 remain_calm B Oct. 11, 2020, 1:48 p.m. OK GNU C++17 TESTS 14 62 819200
95266017 Wenzhongxing B Oct. 11, 2020, 1:30 p.m. OK GNU C++17 TESTS 14 62 819200
95282636 moikfer B Oct. 11, 2020, 4:14 p.m. OK GNU C++17 TESTS 14 62 1638400
95270584 31801159 B Oct. 11, 2020, 2:27 p.m. OK GNU C++17 TESTS 14 62 1638400
95289658 LoNgLoNgDoUblE B Oct. 11, 2020, 5:36 p.m. OK GNU C++17 (64) TESTS 14 46 819200
95286015 Soumya1 B Oct. 11, 2020, 4:58 p.m. OK GNU C++17 (64) TESTS 14 46 819200
95276455 haengsyo B Oct. 11, 2020, 2:54 p.m. OK GNU C++17 (64) TESTS 14 46 819200
95263150 sladkayaKlubnichka B Oct. 11, 2020, 12:56 p.m. OK GNU C++17 (64) TESTS 14 46 819200
95293860 Anachor B Oct. 11, 2020, 6:47 p.m. OK GNU C++17 (64) TESTS 14 46 819200
95290807 Harshlyn94 B Oct. 11, 2020, 5:56 p.m. OK GNU C++17 (64) TESTS 14 46 819200
95291102 ImranIF B Oct. 11, 2020, 5:59 p.m. OK GNU C++17 (64) TESTS 14 46 1638400
95301684 aryan005 B Oct. 11, 2020, 9:56 p.m. OK GNU C++17 (64) TESTS 14 46 1638400
95310804 roshan_mehta B Oct. 12, 2020, 3:58 a.m. OK GNU C++17 (64) TESTS 14 46 1638400
95292676 Iaum_heystella B Oct. 11, 2020, 6:26 p.m. OK GNU C++17 (64) TESTS 14 46 1638400
95311576 pgupta9830 B Oct. 12, 2020, 4:17 a.m. OK Java 11 TESTS 14 171 0
95270228 CCS_Covenant B Oct. 11, 2020, 2:23 p.m. OK Java 11 TESTS 14 217 0
95270027 skittles1412 B Oct. 11, 2020, 2:20 p.m. OK Java 11 TESTS 14 217 0
95300142 rafee69029 B Oct. 11, 2020, 9:06 p.m. OK Java 11 TESTS 14 218 3584000
95311404 pgupta9830 B Oct. 12, 2020, 4:13 a.m. OK Java 11 TESTS 14 233 0
95281907 sinha1999aditya B Oct. 11, 2020, 4:04 p.m. OK Java 11 TESTS 14 233 3174400
95313742 gssakash B Oct. 12, 2020, 5:11 a.m. OK Java 11 TESTS 14 234 0
95269781 DreamInfinite B Oct. 11, 2020, 2:17 p.m. OK Java 11 TESTS 14 249 0
95287430 KoustavBeginner B Oct. 11, 2020, 5:02 p.m. OK Java 11 TESTS 14 249 3276800
95305194 tusharjape007 B Oct. 12, 2020, 12:48 a.m. OK Java 11 TESTS 14 249 4096000
95289840 vatsal512 B Oct. 11, 2020, 5:39 p.m. OK Java 8 TESTS 14 139 0
95310814 ragnarok001 B Oct. 12, 2020, 3:58 a.m. OK Java 8 TESTS 14 140 0
95268210 PersonOfInterest B Oct. 11, 2020, 1:57 p.m. OK Java 8 TESTS 14 155 0
95268143 RockStar_14 B Oct. 11, 2020, 1:56 p.m. OK Java 8 TESTS 14 170 0
95271639 theBiker B Oct. 11, 2020, 2:41 p.m. OK Java 8 TESTS 14 170 13414400
95258787 BNL B Oct. 11, 2020, 12:06 p.m. OK Java 8 TESTS 14 171 0
95262657 MartyByrde B Oct. 11, 2020, 12:50 p.m. OK Java 8 TESTS 14 171 0
95264035 kalzor B Oct. 11, 2020, 1:07 p.m. OK Java 8 TESTS 14 171 11468800
95290615 Kimo_Fathy B Oct. 11, 2020, 5:52 p.m. OK Java 8 TESTS 14 171 11776000
95267311 RockStar_14 B Oct. 11, 2020, 1:46 p.m. OK Java 8 TESTS 14 171 12800000
95287119 nuralamcse024 B Oct. 11, 2020, 4:58 p.m. OK JavaScript TESTS 14 187 20787200
95259336 Mirimax B Oct. 11, 2020, 12:12 p.m. OK Kotlin TESTS 14 280 17817600
95291275 wbars B Oct. 11, 2020, 6:02 p.m. OK Kotlin TESTS 14 514 3481600
95301960 vitaliy_dubovyk B Oct. 11, 2020, 10:07 p.m. OK Mono C# TESTS 14 155 27648000
95283351 tomasz.masternak B Oct. 11, 2020, 4:23 p.m. OK Mono C# TESTS 14 155 34508800
95276157 Zorch B Oct. 11, 2020, 2:50 p.m. OK MS C++ TESTS 14 202 3276800
95256066 qiuyawen B Oct. 11, 2020, 11:37 a.m. OK MS C++ 2017 TESTS 14 93 819200
95262213 Gushi B Oct. 11, 2020, 12:46 p.m. OK MS C++ 2017 TESTS 14 202 1638400
95255141 semihpirpir B Oct. 11, 2020, 11:28 a.m. OK MS C++ 2017 TESTS 14 202 1740800
95270376 Pathlessbark8 B Oct. 11, 2020, 2:25 p.m. OK MS C++ 2017 TESTS 14 217 1638400
95289473 KRIS1 B Oct. 11, 2020, 5:34 p.m. OK MS C++ 2017 TESTS 14 217 1638400
95271173 transcending B Oct. 11, 2020, 2:35 p.m. OK MS C++ 2017 TESTS 14 218 819200
95248960 14long B Oct. 11, 2020, 10:58 a.m. OK MS C++ 2017 TESTS 14 218 1638400
95308652 HippyTD B Oct. 12, 2020, 2:56 a.m. OK MS C++ 2017 TESTS 14 218 1638400
95253824 S.O.D B Oct. 11, 2020, 11:17 a.m. OK MS C++ 2017 TESTS 14 233 3584000
95265620 y_zk B Oct. 11, 2020, 1:25 p.m. OK MS C++ 2017 TESTS 14 1591 1638400
95257915 UltraRightMan B Oct. 11, 2020, 11:56 a.m. OK .NET Core C# TESTS 14 124 30412800
95253939 Zara_thustra B Oct. 11, 2020, 11:18 a.m. OK Node.js TESTS 14 186 29388800
95278275 toxahak B Oct. 11, 2020, 3:17 p.m. OK Node.js TESTS 14 186 30310400
95301428 june_waves B Oct. 11, 2020, 9:47 p.m. OK PyPy 3 TESTS 14 202 21504000
95262659 Anuranjan_Pandey B Oct. 11, 2020, 12:50 p.m. OK PyPy 3 TESTS 14 217 20684800
95301330 june_waves B Oct. 11, 2020, 9:44 p.m. OK PyPy 3 TESTS 14 218 20684800
95267833 devil9614 B Oct. 11, 2020, 1:52 p.m. OK PyPy 3 TESTS 14 249 18534400
95294933 Moriyan B Oct. 11, 2020, 7:06 p.m. OK PyPy 3 TESTS 14 295 16486400
95247680 itsmesoumik21 B Oct. 11, 2020, 10:55 a.m. OK PyPy 3 TESTS 14 296 19148800
95298115 4th2D B Oct. 11, 2020, 8:14 p.m. OK PyPy 3 TESTS 14 311 18944000
95282362 Stephan B Oct. 11, 2020, 4:11 p.m. OK PyPy 3 TESTS 14 311 19046400
95269809 vanya12 B Oct. 11, 2020, 2:17 p.m. OK PyPy 3 TESTS 14 311 19148800
95265564 301_anky B Oct. 11, 2020, 1:25 p.m. OK PyPy 3 TESTS 14 311 19148800
95296737 elistark B Oct. 11, 2020, 7:44 p.m. OK Python 2 TESTS 14 327 11264000
95268908 sh1194 B Oct. 11, 2020, 2:05 p.m. OK Python 3 TESTS 14 202 18329600
95290348 ByMykel B Oct. 11, 2020, 5:47 p.m. OK Python 3 TESTS 14 202 18432000
95288102 sandeeppoloju B Oct. 11, 2020, 5:13 p.m. OK Python 3 TESTS 14 202 18432000
95257686 kumud1997 B Oct. 11, 2020, 11:53 a.m. OK Python 3 TESTS 14 217 16793600
95252809 bigode B Oct. 11, 2020, 11:10 a.m. OK Python 3 TESTS 14 217 18329600
95277396 Mr.Krishna B Oct. 11, 2020, 3:06 p.m. OK Python 3 TESTS 14 218 16793600
95256658 abhi.tiwari B Oct. 11, 2020, 11:42 a.m. OK Python 3 TESTS 14 218 16793600
95292506 LintuStorm B Oct. 11, 2020, 6:23 p.m. OK Python 3 TESTS 14 218 16896000
95310518 TeraTau B Oct. 12, 2020, 3:50 a.m. OK Python 3 TESTS 14 218 16998400
95282159 cp_noob B Oct. 11, 2020, 4:08 p.m. OK Python 3 TESTS 14 218 16998400
95261207 yosik B Oct. 11, 2020, 12:33 p.m. OK Rust TESTS 14 46 7065600
95300129 Marcis B Oct. 11, 2020, 9:05 p.m. OK Scala TESTS 14 592 17715200

remove filters

Back to search problems