Educational Codeforces Round 126 (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
1661 Educational Codeforces Round 126 (Rated for Div. 2) FINISHED False 7200 87665063 April 9, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9575 ) C Water the Trees PROGRAMMING binary search greedy math

B"There are n trees in a park, numbered from 1 to n . The initial height of the i -th tree is h_i . You want to water these trees, so they all grow to the same height. The watering process goes as follows. You start watering trees at day 1 . During the j -th day you can: Note that you can't water more than one tree in a day. Your task is to determine the minimum number of days required to water the trees so they grow to the same height. You have to answer t independent test cases. The first line of the input contains one integer t ( 1 <= t <= 2 cdot 10^4 ) -- the number of test cases. The first line of the test case contains one integer n ( 1 <= n <= 3 cdot 10^5 ) -- the number of trees. The second line of the test case contains n integers h_1, h_2, ldots, h_n ( 1 <= h_i <= 10^9 ), where h_i is the height of the i -th tree. It is guaranteed that the sum of n over all test cases does not exceed 3 cdot 10^5 ( sum n <= 3 cdot 10^5 ). For each test case, print one integer -- the minimum number of days required to water the trees, so they grow to the same height. Consider the first test case of the example. The initial state of the trees is [1, 2, 4] . Thus, the answer is 4 . "...

Tutorials

Educational Codeforces Round 126 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
153235467 ruban C April 9, 2022, 7:32 p.m. OK Delphi TESTS 9 156 19353600
153241648 NenadDapic C April 9, 2022, 9:20 p.m. OK FPC TESTS 9 124 1331200
153218680 kakooda C April 9, 2022, 4:33 p.m. OK FPC TESTS 9 140 1228800
153242397 NenadDapic C April 9, 2022, 9:39 p.m. OK FPC TESTS 9 140 1331200
153212413 YOK C April 9, 2022, 4:18 p.m. OK GNU C11 TESTS 9 234 2457600
153233579 the_3rd_eye C April 9, 2022, 7:05 p.m. OK GNU C++14 TESTS 9 77 8704000
153247939 maiky C April 10, 2022, 12:32 a.m. OK GNU C++14 TESTS 9 78 1228800
153224268 mj_79 C April 9, 2022, 5:06 p.m. OK GNU C++14 TESTS 9 78 1228800
153218745 ANURAG_03 C April 9, 2022, 4:33 p.m. OK GNU C++14 TESTS 9 78 1228800
153215990 zscscsdcd C April 9, 2022, 4:27 p.m. OK GNU C++14 TESTS 9 78 1228800
153215921 rohit_salla100 C April 9, 2022, 4:27 p.m. OK GNU C++14 TESTS 9 78 1228800
153211387 soumik_1626 C April 9, 2022, 4:15 p.m. OK GNU C++14 TESTS 9 78 1228800
153211153 toxicovi C April 9, 2022, 4:14 p.m. OK GNU C++14 TESTS 9 78 1228800
153254025 wuxikui C April 10, 2022, 3:23 a.m. OK GNU C++14 TESTS 9 78 1228800
153211896 chrhaaeon C April 9, 2022, 4:16 p.m. OK GNU C++14 TESTS 9 78 2355200
153224500 et3_tsy3.0 C April 9, 2022, 5:09 p.m. OK GNU C++17 TESTS 9 31 6451200
153215871 AhmedHassan141 C April 9, 2022, 4:27 p.m. OK GNU C++17 TESTS 9 77 1228800
153211228 Firefrog418 C April 9, 2022, 4:15 p.m. OK GNU C++17 TESTS 9 78 1228800
153225596 happy--ending C April 9, 2022, 5:20 p.m. OK GNU C++17 TESTS 9 78 1228800
153235026 PyTorch C April 9, 2022, 7:25 p.m. OK GNU C++17 TESTS 9 78 1331200
153212553 PineapplesOnPizza C April 9, 2022, 4:18 p.m. OK GNU C++17 TESTS 9 78 2457600
153248493 Xu_Molly C April 10, 2022, 12:49 a.m. OK GNU C++17 TESTS 9 78 2457600
153223631 shroud777 C April 9, 2022, 5:01 p.m. OK GNU C++17 TESTS 9 78 7168000
153261463 peking_university_xwj C April 10, 2022, 5:39 a.m. OK GNU C++17 TESTS 9 93 1228800
153260754 peking_university_xwj C April 10, 2022, 5:30 a.m. OK GNU C++17 TESTS 9 93 1228800
153223566 propane C April 9, 2022, 5:01 p.m. OK GNU C++17 (64) TESTS 9 61 1228800
153246890 Stark0509 C April 9, 2022, 11:54 p.m. OK GNU C++17 (64) TESTS 9 61 2355200
153215563 anant83 C April 9, 2022, 4:26 p.m. OK GNU C++17 (64) TESTS 9 61 2457600
153212262 shadow_noxx C April 9, 2022, 4:17 p.m. OK GNU C++17 (64) TESTS 9 62 1228800
153215122 atanughosh01 C April 9, 2022, 4:25 p.m. OK GNU C++17 (64) TESTS 9 62 2355200
153223150 n_m_p C April 9, 2022, 4:58 p.m. OK GNU C++17 (64) TESTS 9 62 2355200
153250432 gqf123 C April 10, 2022, 1:54 a.m. OK GNU C++17 (64) TESTS 9 62 2457600
153229758 inzamam_inz C April 9, 2022, 6:12 p.m. OK GNU C++17 (64) TESTS 9 62 2457600
153227651 jesse_pinkman_619 C April 9, 2022, 5:43 p.m. OK GNU C++17 (64) TESTS 9 62 2457600
153253513 Svlad_Cjelli C April 10, 2022, 3:10 a.m. OK GNU C++17 (64) TESTS 9 62 2457600
153226613 OtabekJurabekov C April 9, 2022, 5:32 p.m. OK GNU C++20 (64) TESTS 9 46 1228800
153224186 dayuanx C April 9, 2022, 5:06 p.m. OK GNU C++20 (64) TESTS 9 46 1228800
153220728 t4m0fey C April 9, 2022, 4:41 p.m. OK GNU C++20 (64) TESTS 9 46 1228800
153219246 rakshith21mohan C April 9, 2022, 4:34 p.m. OK GNU C++20 (64) TESTS 9 46 1228800
153219736 xingmaqi C April 9, 2022, 4:36 p.m. OK GNU C++20 (64) TESTS 9 46 1228800
153260147 DM11 C April 10, 2022, 5:23 a.m. OK GNU C++20 (64) TESTS 9 46 1228800
153249780 tyler C April 10, 2022, 1:35 a.m. OK GNU C++20 (64) TESTS 9 46 1228800
153232142 adityam1 C April 9, 2022, 6:44 p.m. OK GNU C++20 (64) TESTS 9 46 1228800
153229423 Wqk_Love_Lfy C April 9, 2022, 6:08 p.m. OK GNU C++20 (64) TESTS 9 46 1228800
153227526 stcmuyi C April 9, 2022, 5:42 p.m. OK GNU C++20 (64) TESTS 9 46 1228800
153211902 LXL C April 9, 2022, 4:16 p.m. OK Go TESTS 9 249 4505600
153247078 not_good_enough_yet C April 10, 2022, 12:02 a.m. OK Go TESTS 9 280 5120000
153225000 MatthewRaker C April 9, 2022, 5:14 p.m. OK Java 11 TESTS 9 249 5734400
153212662 1364354238zxd C April 9, 2022, 4:18 p.m. OK Java 11 TESTS 9 327 0
153214020 PRAXKILLER C April 9, 2022, 4:22 p.m. OK Java 11 TESTS 9 358 3891200
153227248 Plums C April 9, 2022, 5:39 p.m. OK Java 11 TESTS 9 389 3891200
153227677 dzhi C April 9, 2022, 5:44 p.m. OK Java 11 TESTS 9 389 4096000
153245191 arthuryuan15 C April 9, 2022, 10:53 p.m. OK Java 11 TESTS 9 390 3891200
153227279 dzhi C April 9, 2022, 5:39 p.m. OK Java 11 TESTS 9 405 4096000
153221434 x21svage C April 9, 2022, 4:45 p.m. OK Java 11 TESTS 9 436 6144000
153225847 def_not_alt C April 9, 2022, 5:23 p.m. OK Java 11 TESTS 9 483 0
153228806 Serg_ C April 9, 2022, 5:58 p.m. OK Java 11 TESTS 9 748 0
153233322 Omar_Mohammad C April 9, 2022, 7:01 p.m. OK Java 8 TESTS 9 218 12800000
153233090 Omar_Mohammad C April 9, 2022, 6:58 p.m. OK Java 8 TESTS 9 233 12697600
153233062 Omar_Mohammad C April 9, 2022, 6:58 p.m. OK Java 8 TESTS 9 280 12800000
153260032 harshsingla06 C April 10, 2022, 5:21 a.m. OK Java 8 TESTS 9 296 12800000
153219363 Push_back7 C April 9, 2022, 4:34 p.m. OK Java 8 TESTS 9 342 14643200
153229184 ardekarsanket C April 9, 2022, 6:04 p.m. OK Java 8 TESTS 9 343 14643200
153242293 Somya-15 C April 9, 2022, 9:36 p.m. OK Java 8 TESTS 9 639 0
153258185 13125003809 C April 10, 2022, 4:49 a.m. OK Java 8 TESTS 9 701 0
153231710 Eslam_Ahmed C April 9, 2022, 6:38 p.m. OK Java 8 TESTS 9 1247 14643200
153224311 Eslam_Ahmed C April 9, 2022, 5:07 p.m. OK Java 8 TESTS 9 1278 14643200
153228135 arvindf232 C April 9, 2022, 5:50 p.m. OK Kotlin 1.4 TESTS 9 139 1126400
153223478 koboshi C April 9, 2022, 5 p.m. OK Kotlin 1.6 TESTS 9 374 18944000
153220470 BruteForcee C April 9, 2022, 4:40 p.m. OK Kotlin 1.6 TESTS 9 1404 16691200
153219356 Nuklinoid C April 9, 2022, 4:34 p.m. OK Mono C# TESTS 9 265 33177600
153249273 AIdancer C April 10, 2022, 1:18 a.m. OK MS C++ 2017 TESTS 9 108 1228800
153216770 WoodMachine C April 9, 2022, 4:29 p.m. OK MS C++ 2017 TESTS 9 343 1228800
153213028 r0mashka C April 9, 2022, 4:19 p.m. OK MS C++ 2017 TESTS 9 374 1228800
153216274 WoodMachine C April 9, 2022, 4:28 p.m. OK MS C++ 2017 TESTS 9 452 1228800
153216103 WoodMachine C April 9, 2022, 4:27 p.m. OK MS C++ 2017 TESTS 9 1325 1228800
153251887 typeryougishiki C April 10, 2022, 2:29 a.m. OK MS C++ 2017 TESTS 9 1450 2457600
153222140 XYShaoKang C April 9, 2022, 4:50 p.m. OK Node.js TESTS 9 249 30617600
153221097 1_2_3_4_5_9 C April 9, 2022, 4:43 p.m. OK PyPy 2 TESTS 9 218 26214400
153216911 sksshivam007 C April 9, 2022, 4:29 p.m. OK PyPy 2 TESTS 9 342 32870400
153225683 acorn11 C April 9, 2022, 5:21 p.m. OK PyPy 2 TESTS 9 545 18534400
153223376 lemiao12 C April 9, 2022, 4:59 p.m. OK PyPy 3 TESTS 9 218 27443200
153251747 michael.g.pan C April 10, 2022, 2:26 a.m. OK PyPy 3 TESTS 9 233 28160000
153231764 abhaumik24 C April 9, 2022, 6:39 p.m. OK PyPy 3 TESTS 9 483 31539200
153257097 arpan.parikh C April 10, 2022, 4:31 a.m. OK PyPy 3 TESTS 9 545 87961600
153257038 xPyThMx C April 10, 2022, 4:30 a.m. OK PyPy 3 TESTS 9 842 20787200
153247909 novellep C April 10, 2022, 12:31 a.m. OK PyPy 3 TESTS 9 842 26521600
153217473 ambs_ C April 9, 2022, 4:31 p.m. OK PyPy 3 TESTS 9 873 25804800
153263053 quangltfsc0378 C April 10, 2022, 5:58 a.m. OK PyPy 3 TESTS 9 1013 26521600
153222718 waterprof C April 9, 2022, 4:54 p.m. OK PyPy 3 TESTS 9 2948 26624000
153257829 notTehlka C April 10, 2022, 4:43 a.m. OK PyPy 3-64 TESTS 9 155 45056000
153245493 beethoven97 C April 9, 2022, 11:03 p.m. OK PyPy 3-64 TESTS 9 202 27955200
153259553 sakshatmali C April 10, 2022, 5:15 a.m. OK PyPy 3-64 TESTS 9 202 33792000
153259704 Aksnov C April 10, 2022, 5:17 a.m. OK PyPy 3-64 TESTS 9 202 39628800
153222279 Mashin_larner C April 9, 2022, 4:51 p.m. OK PyPy 3-64 TESTS 9 202 40960000
153245578 beethoven97 C April 9, 2022, 11:07 p.m. OK PyPy 3-64 TESTS 9 233 27955200
153249980 yupooh C April 10, 2022, 1:40 a.m. OK PyPy 3-64 TESTS 9 358 48435200
153256333 siph C April 10, 2022, 4:16 a.m. OK PyPy 3-64 TESTS 9 374 47308800
153258077 ferz C April 10, 2022, 4:47 a.m. OK PyPy 3-64 TESTS 9 389 34816000
153230376 Venia C April 9, 2022, 6:20 p.m. OK PyPy 3-64 TESTS 9 389 44748800
153255723 kwin C April 10, 2022, 4:04 a.m. OK Python 3 TESTS 9 483 22425600
153239134 james0828 C April 9, 2022, 8:31 p.m. OK Python 3 TESTS 9 624 22016000
153234816 andr14142 C April 9, 2022, 7:22 p.m. OK Python 3 TESTS 9 670 17920000
153225391 devraj_goswami C April 9, 2022, 5:18 p.m. OK Python 3 TESTS 9 686 22016000
153212928 alonforces C April 9, 2022, 4:19 p.m. OK Python 3 TESTS 9 764 23040000
153240225 sushantyerawar_2002 C April 9, 2022, 8:50 p.m. OK Python 3 TESTS 9 1123 22732800
153244566 gmbrandt C April 9, 2022, 10:35 p.m. OK Python 3 TESTS 9 1310 28467200
153216091 robostac C April 9, 2022, 4:27 p.m. OK Rust 2021 TESTS 9 31 10854400
153250474 sansen C April 10, 2022, 1:55 a.m. OK Rust 2021 TESTS 9 46 7680000
153216836 togatoga C April 9, 2022, 4:29 p.m. OK Rust 2021 TESTS 9 93 33075200
153239362 RunGood C April 9, 2022, 8:34 p.m. OK Rust 2021 TESTS 9 358 11571200

remove filters

Back to search problems