Educational Codeforces Round 98 (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
1452 Educational Codeforces Round 98 (Rated for Div. 2) FINISHED False 7200 131383463 Nov. 19, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14884 ) B Toy Blocks PROGRAMMING binary search greedy math sortings

B"You are asked to watch your nephew who likes to play with toy blocks in a strange way. He has n boxes and the i -th box has a_i blocks. His game consists of two steps: You don't want to make your nephew sad, so you decided to put several extra blocks into some boxes in such a way that no matter which box i he chooses he won't be sad. What is the minimum number of extra blocks you need to put? The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. The first line of each test case contains the integer n ( 2 <= n <= 10^5 ) -- the number of boxes. The second line of each test case contains n integers a_1, a_2, ... , a_n ( 0 <= a_i <= 10^9 ) -- the number of blocks in each box. It's guaranteed that the sum of n over test cases doesn't exceed 10^5 . For each test case, print a single integer -- the minimum number of blocks you need to put. It can be proved that the answer always exists, i. e. the number of blocks is finite. In the first test case, you can, for example, put one extra block into the first box and make a = [4, 2, 2] . If your nephew chooses the box with 4 blocks, then we will move two blocks to the second box and two blocks to the third box. If he chooses the box with 2 blocks then he will move these two blocks to the other box with 2 blocks. In the second test case, you don't need to put any extra blocks, since no matter which box your nephew chooses, he can always make other boxes equal. In the third test case, you should put 3 extra blocks. For example, you can put 2 blocks in the first box and 1 block in the third box. You'll get array a = [2, 3, 1] . "...

Tutorials

84847

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
98950097 MasterNo1u B Nov. 19, 2020, 5:02 p.m. OK GNU C11 TESTS 5 31 1638400
98939537 akash456 B Nov. 19, 2020, 4:12 p.m. OK GNU C11 TESTS 5 46 819200
98985355 1435730 B Nov. 19, 2020, 8:31 p.m. OK GNU C11 TESTS 5 46 819200
98992773 SOCAER B Nov. 20, 2020, 2:04 a.m. OK GNU C++11 TESTS 5 15 0
99002278 Maybach B Nov. 20, 2020, 6 a.m. OK GNU C++11 TESTS 5 15 0
98936010 yicongli B Nov. 19, 2020, 4 p.m. OK GNU C++11 TESTS 5 15 409600
98937290 littlechai B Nov. 19, 2020, 4:04 p.m. OK GNU C++11 TESTS 5 15 409600
98990851 expect2004 B Nov. 20, 2020, 12:34 a.m. OK GNU C++11 TESTS 5 15 819200
98989699 Dickson_ B Nov. 19, 2020, 11:26 p.m. OK GNU C++11 TESTS 5 15 1638400
98990574 ZgZhiWn B Nov. 20, 2020, 12:16 a.m. OK GNU C++11 TESTS 5 15 1638400
98994827 mohei0 B Nov. 20, 2020, 3:14 a.m. OK GNU C++11 TESTS 5 15 7987200
98993701 _PaRz1VaL B Nov. 20, 2020, 2:39 a.m. OK GNU C++11 TESTS 5 30 0
98994973 SOCAER B Nov. 20, 2020, 3:18 a.m. OK GNU C++11 TESTS 5 30 0
98937931 testhhh B Nov. 19, 2020, 4:06 p.m. OK GNU C++14 TESTS 5 15 5120000
98995167 hinatahentai69 B Nov. 20, 2020, 3:23 a.m. OK GNU C++14 TESTS 5 30 0
98995606 mehtarishavsingh B Nov. 20, 2020, 3:36 a.m. OK GNU C++14 TESTS 5 30 0
98941522 nmnsharma007 B Nov. 19, 2020, 4:19 p.m. OK GNU C++14 TESTS 5 30 0
98976357 karan0046 B Nov. 19, 2020, 5:32 p.m. OK GNU C++14 TESTS 5 30 409600
98947295 foxriver B Nov. 19, 2020, 4:41 p.m. OK GNU C++14 TESTS 5 30 409600
98940778 sultan_01 B Nov. 19, 2020, 4:16 p.m. OK GNU C++14 TESTS 5 30 819200
98993604 90n B Nov. 20, 2020, 2:36 a.m. OK GNU C++14 TESTS 5 30 819200
98954282 boogeyman1 B Nov. 19, 2020, 5:05 p.m. OK GNU C++14 TESTS 5 30 819200
98948831 yk_ax B Nov. 19, 2020, 4:54 p.m. OK GNU C++14 TESTS 5 30 819200
98992048 mike51 B Nov. 20, 2020, 1:30 a.m. OK GNU C++17 TESTS 5 15 819200
98976991 lebarelue B Nov. 19, 2020, 5:41 p.m. OK GNU C++17 TESTS 5 30 0
99000772 TLEKiller B Nov. 20, 2020, 5:33 a.m. OK GNU C++17 TESTS 5 30 409600
98949640 suaebahmed B Nov. 19, 2020, 4:57 p.m. OK GNU C++17 TESTS 5 30 409600
98937077 prabhsimar100 B Nov. 19, 2020, 4:03 p.m. OK GNU C++17 TESTS 5 30 819200
98945560 amanthakur B Nov. 19, 2020, 4:33 p.m. OK GNU C++17 TESTS 5 30 819200
98942829 saiyan_01 B Nov. 19, 2020, 4:24 p.m. OK GNU C++17 TESTS 5 30 819200
98938828 I_AM_GRUTE B Nov. 19, 2020, 4:09 p.m. OK GNU C++17 TESTS 5 30 819200
98986452 _Yezhik_ B Nov. 19, 2020, 9:03 p.m. OK GNU C++17 TESTS 5 30 1638400
98942287 shashwat259 B Nov. 19, 2020, 4:22 p.m. OK GNU C++17 TESTS 5 30 3174400
98983244 let_the_game_begin B Nov. 19, 2020, 7:36 p.m. OK GNU C++17 (64) TESTS 5 15 819200
98942845 mahbubhasanmht B Nov. 19, 2020, 4:24 p.m. OK GNU C++17 (64) TESTS 5 15 819200
98977912 __Achilles B Nov. 19, 2020, 5:56 p.m. OK GNU C++17 (64) TESTS 5 30 0
99001620 alif_cse_ju B Nov. 20, 2020, 5:48 a.m. OK GNU C++17 (64) TESTS 5 30 0
99000580 adi2710 B Nov. 20, 2020, 5:29 a.m. OK GNU C++17 (64) TESTS 5 30 0
98989434 jnk B Nov. 19, 2020, 11:09 p.m. OK GNU C++17 (64) TESTS 5 30 0
98943494 moraprex B Nov. 19, 2020, 4:26 p.m. OK GNU C++17 (64) TESTS 5 30 0
98990965 armoking B Nov. 20, 2020, 12:39 a.m. OK GNU C++17 (64) TESTS 5 30 409600
98998940 mehedyhassan865 B Nov. 20, 2020, 4:56 a.m. OK GNU C++17 (64) TESTS 5 30 409600
98988561 PARTHA_04 B Nov. 19, 2020, 10:25 p.m. OK GNU C++17 (64) TESTS 5 30 409600
98975951 afrozenman B Nov. 19, 2020, 5:26 p.m. OK Go TESTS 5 93 0
98995234 HaKkaz.an B Nov. 20, 2020, 3:25 a.m. OK Haskell TESTS 5 187 7372800
98987040 uc-nuts B Nov. 19, 2020, 9:22 p.m. OK Haskell TESTS 5 202 7372800
98985546 bobbilyking B Nov. 19, 2020, 8:36 p.m. OK Java 11 TESTS 5 170 0
98935660 DreamInfinite B Nov. 19, 2020, 3:59 p.m. OK Java 11 TESTS 5 171 0
99002525 KGECian_23 B Nov. 20, 2020, 6:04 a.m. OK Java 11 TESTS 5 171 0
98998135 Md_Osama B Nov. 20, 2020, 4:39 a.m. OK Java 11 TESTS 5 186 0
98942661 NussairHroub B Nov. 19, 2020, 4:23 p.m. OK Java 11 TESTS 5 187 0
98998188 glider.g B Nov. 20, 2020, 4:40 a.m. OK Java 11 TESTS 5 187 0
98976568 soumit915 B Nov. 19, 2020, 5:35 p.m. OK Java 11 TESTS 5 187 0
98936934 b0bl0blaw B Nov. 19, 2020, 4:03 p.m. OK Java 11 TESTS 5 187 0
98979997 singhdhanwant B Nov. 19, 2020, 6:32 p.m. OK Java 11 TESTS 5 202 0
98997599 prafful49 B Nov. 20, 2020, 4:27 a.m. OK Java 11 TESTS 5 202 0
98939702 MubtasimShahriar B Nov. 19, 2020, 4:12 p.m. OK Java 8 TESTS 5 93 0
98984827 tarun_sm B Nov. 19, 2020, 8:16 p.m. OK Java 8 TESTS 5 93 0
98997835 eng_hardik B Nov. 20, 2020, 4:32 a.m. OK Java 8 TESTS 5 93 0
98987825 MartyByrde B Nov. 19, 2020, 9:52 p.m. OK Java 8 TESTS 5 108 0
98998128 ojhaankesh1975 B Nov. 20, 2020, 4:39 a.m. OK Java 8 TESTS 5 108 0
98993155 csn3rd B Nov. 20, 2020, 2:19 a.m. OK Java 8 TESTS 5 108 0
99002349 Pranay2516 B Nov. 20, 2020, 6:01 a.m. OK Java 8 TESTS 5 109 0
98992778 kadintang1 B Nov. 20, 2020, 2:05 a.m. OK Java 8 TESTS 5 124 0
99002140 C1Lin B Nov. 20, 2020, 5:58 a.m. OK Java 8 TESTS 5 124 0
98997612 RichardBot7000 B Nov. 20, 2020, 4:27 a.m. OK Java 8 TESTS 5 124 0
98938080 MartiBook B Nov. 19, 2020, 4:07 p.m. OK Kotlin TESTS 5 171 102400
98950120 Scotty_pwnz B Nov. 19, 2020, 5:02 p.m. OK Kotlin TESTS 5 187 102400
98980432 Ayyyoub B Nov. 19, 2020, 6:40 p.m. OK Kotlin TESTS 5 187 102400
98936462 koper B Nov. 19, 2020, 4:01 p.m. OK Kotlin TESTS 5 217 102400
98942204 ravinem1 B Nov. 19, 2020, 4:21 p.m. OK Mono C# TESTS 5 77 9011200
98937958 LLI_E_P_JI_O_K B Nov. 19, 2020, 4:06 p.m. OK MS C++ 2017 TESTS 5 46 819200
98940383 little_lion B Nov. 19, 2020, 4:15 p.m. OK MS C++ 2017 TESTS 5 46 819200
98950167 Accumulate_gradually B Nov. 19, 2020, 5:02 p.m. OK MS C++ 2017 TESTS 5 62 819200
98937051 minigimbob B Nov. 19, 2020, 4:03 p.m. OK MS C++ 2017 TESTS 5 78 0
98992064 TianZai B Nov. 20, 2020, 1:31 a.m. OK MS C++ 2017 TESTS 5 93 0
98982781 dominotim B Nov. 19, 2020, 7:26 p.m. OK MS C++ 2017 TESTS 5 93 819200
98979227 JackieLee B Nov. 19, 2020, 6:19 p.m. OK MS C++ 2017 TESTS 5 108 0
98942631 Toryu B Nov. 19, 2020, 4:23 p.m. OK MS C++ 2017 TESTS 5 108 0
98998983 wjdekdms9 B Nov. 20, 2020, 4:57 a.m. OK MS C++ 2017 TESTS 5 108 0
98946594 getN1ght B Nov. 19, 2020, 4:36 p.m. OK MS C++ 2017 TESTS 5 108 819200
98944063 tomvai15 B Nov. 19, 2020, 4:28 p.m. OK .NET Core C# TESTS 5 93 7168000
98977567 eisichenko B Nov. 19, 2020, 5:51 p.m. OK .NET Core C# TESTS 5 93 7884800
98978108 eisichenko B Nov. 19, 2020, 6 p.m. OK .NET Core C# TESTS 5 108 8089600
98978136 eisichenko B Nov. 19, 2020, 6 p.m. OK .NET Core C# TESTS 5 109 8089600
98992588 explorer_sifat B Nov. 20, 2020, 1:55 a.m. OK Node.js TESTS 5 93 5734400
98939231 tutai B Nov. 19, 2020, 4:11 p.m. OK Node.js TESTS 5 170 6041600
98940139 raj1307 B Nov. 19, 2020, 4:14 p.m. OK PyPy 2 TESTS 5 140 5427200
98944338 realnimish B Nov. 19, 2020, 4:29 p.m. OK PyPy 2 TESTS 5 155 6758400
98947337 vvedant99 B Nov. 19, 2020, 4:41 p.m. OK PyPy 3 TESTS 5 171 6041600
99000679 Anuranjan_Pandey B Nov. 20, 2020, 5:31 a.m. OK PyPy 3 TESTS 5 187 6144000
98980598 _Hajime_ B Nov. 19, 2020, 6:43 p.m. OK PyPy 3 TESTS 5 202 6758400
98936834 harshitkapoor B Nov. 19, 2020, 4:02 p.m. OK PyPy 3 TESTS 5 217 6553600
98983709 perDAYTwo_A B Nov. 19, 2020, 7:47 p.m. OK PyPy 3 TESTS 5 233 6860800
98961992 uuuu_s B Nov. 19, 2020, 5:09 p.m. OK PyPy 3 TESTS 5 233 6860800
98946265 deepanshu_pali B Nov. 19, 2020, 4:34 p.m. OK PyPy 3 TESTS 5 233 6860800
98978131 codecunt7 B Nov. 19, 2020, 6 p.m. OK PyPy 3 TESTS 5 233 7577600
98961917 DarkOverlord999 B Nov. 19, 2020, 5:08 p.m. OK PyPy 3 TESTS 5 233 7680000
98948784 strivetodeath B Nov. 19, 2020, 4:53 p.m. OK PyPy 3 TESTS 5 248 7168000
98993199 biltharesatyendra B Nov. 20, 2020, 2:22 a.m. OK Python 2 TESTS 5 202 1433600
98997876 DevanshGoel B Nov. 20, 2020, 4:33 a.m. OK Python 3 TESTS 5 108 1126400
99002384 kaif_7 B Nov. 20, 2020, 6:02 a.m. OK Python 3 TESTS 5 109 1126400
98981587 t_error B Nov. 19, 2020, 7:01 p.m. OK Python 3 TESTS 5 124 1126400
98980896 patrickvando B Nov. 19, 2020, 6:48 p.m. OK Python 3 TESTS 5 124 1126400
98980193 Serjeel_Ranjan B Nov. 19, 2020, 6:36 p.m. OK Python 3 TESTS 5 124 1126400
98977789 gokufan1769 B Nov. 19, 2020, 5:54 p.m. OK Python 3 TESTS 5 124 1126400
98999475 rummansadik B Nov. 20, 2020, 5:07 a.m. OK Python 3 TESTS 5 124 1126400
98998020 DevanshGoel B Nov. 20, 2020, 4:36 a.m. OK Python 3 TESTS 5 124 1126400
98997285 _cyber_punk_007 B Nov. 20, 2020, 4:18 a.m. OK Python 3 TESTS 5 124 1126400
98993716 Laxman_Singh B Nov. 20, 2020, 2:40 a.m. OK Python 3 TESTS 5 124 1126400
98976315 dp0 B Nov. 19, 2020, 5:31 p.m. OK Rust TESTS 5 46 4608000
98968959 aberent B Nov. 19, 2020, 5:17 p.m. OK Rust TESTS 5 46 5017600

remove filters

Back to search problems