Codeforces Round 898 (Div. 4)

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
1873 Codeforces Round 898 (Div. 4) FINISHED False 9000 41873063 Sept. 21, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 28826 ) E Building an Aquarium PROGRAMMING binary search sortings

B"You love fish, that's why you have decided to build an aquarium. You have a piece of coral made of n columns, the i -th of which is a_i units tall. Afterwards, you will build a tank around the coral as follows: The first line contains a single integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The first line of each test case contains two positive integers n and x ( 1 <= q n <= q 2 cdot 10^5 ; 1 <= q x <= q 10^9 ) -- the number of columns of the coral and the maximum amount of water you can use. The second line of each test case contains n space-separated integers a_i ( 1 <= q a_i <= q 10^9 ) -- the heights of the coral. The sum of n over all test cases doesn't exceed 2 cdot 10^5 . For each test case, output a single positive integer h ( h geq 1 ) -- the maximum height the tank can have, so you need at most x units of water to fill up the tank. We have a proof that under these constraints, such a value of h always exists. The first test case is pictured in the statement. With h=4 we need 8 units of water, but if h is increased to 5 we need 13 units of water, which is more than x=9 . So h=4 is optimal. In the second test case, we can pick h=4 and add 3 units to each column, using a total of 9 units of water. It can be shown that this is optimal. In the third test case, we can pick h=2 and use all of our water, so it is optimal. "...

Tutorials

120634

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
224549667 Itql E Sept. 22, 2023, 3 a.m. OK C# 10 TESTS 10 109 13824000
224542699 bluemegane E Sept. 22, 2023, 1 a.m. OK C# 8 TESTS 10 202 27750400
224556828 qiaochu E Sept. 22, 2023, 4:38 a.m. OK Clang++20 Diagnostics TESTS 10 1013 1638400
224554796 SlowMagic E Sept. 22, 2023, 4:08 a.m. OK Clang++20 Diagnostics TESTS 10 1013 1843200
224547978 brightest66 E Sept. 22, 2023, 2:32 a.m. OK Clang++20 Diagnostics TESTS 10 1169 2150400
224528912 NenadDapic E Sept. 21, 2023, 8:11 p.m. OK FPC TESTS 10 93 921600
224557881 ahmedafeef E Sept. 22, 2023, 4:51 a.m. OK GNU C11 TESTS 10 78 819200
224535253 c0derro E Sept. 21, 2023, 9:54 p.m. OK GNU C11 TESTS 10 78 819200
224521311 nestor_makhno E Sept. 21, 2023, 6:48 p.m. OK GNU C11 TESTS 10 93 1638400
224522170 ProGr_ece E Sept. 21, 2023, 6:57 p.m. OK GNU C++14 TESTS 10 46 819200
224537467 TranThienPhuc2657 E Sept. 21, 2023, 10:48 p.m. OK GNU C++14 TESTS 10 46 819200
224541140 anuraggoudlingala39312 E Sept. 22, 2023, 12:27 a.m. OK GNU C++14 TESTS 10 61 819200
224543025 omeganot E Sept. 22, 2023, 1:06 a.m. OK GNU C++14 TESTS 10 61 819200
224521072 Arpitsri_33 E Sept. 21, 2023, 6:45 p.m. OK GNU C++14 TESTS 10 61 1638400
224554829 YJDDB E Sept. 22, 2023, 4:09 a.m. OK GNU C++14 TESTS 10 61 3174400
224561096 reyaan44 E Sept. 22, 2023, 5:30 a.m. OK GNU C++14 TESTS 10 61 6451200
224561013 Akct E Sept. 22, 2023, 5:29 a.m. OK GNU C++14 TESTS 10 62 819200
224554351 JorbanS E Sept. 22, 2023, 4:01 a.m. OK GNU C++14 TESTS 10 62 819200
224531192 vipul_singh E Sept. 21, 2023, 8:42 p.m. OK GNU C++14 TESTS 10 62 819200
224550835 DiegoIvan E Sept. 22, 2023, 3:17 a.m. OK GNU C++17 TESTS 10 46 819200
224547982 BerryPie E Sept. 22, 2023, 2:33 a.m. OK GNU C++17 TESTS 10 46 819200
224555337 leylinfarlier E Sept. 22, 2023, 4:17 a.m. OK GNU C++17 TESTS 10 46 819200
224536377 argonautica E Sept. 21, 2023, 10:22 p.m. OK GNU C++17 TESTS 10 61 819200
224524931 shivu264 E Sept. 21, 2023, 7:25 p.m. OK GNU C++17 TESTS 10 61 819200
224547887 DinosaurSlayer E Sept. 22, 2023, 2:31 a.m. OK GNU C++17 TESTS 10 61 1638400
224554326 tizzytyt E Sept. 22, 2023, 4:01 a.m. OK GNU C++17 TESTS 10 61 1638400
224534011 MecDeLaRue E Sept. 21, 2023, 9:28 p.m. OK GNU C++17 TESTS 10 61 1638400
224537519 Mostafa_Tarek79 E Sept. 21, 2023, 10:49 p.m. OK GNU C++17 TESTS 10 61 1638400
224540446 ignacio_pqsi E Sept. 22, 2023, 12:12 a.m. OK GNU C++17 TESTS 10 61 1638400
224549165 l0ssofTime E Sept. 22, 2023, 2:52 a.m. OK GNU C++17 (64) TESTS 10 31 819200
224555993 Fast_submit E Sept. 22, 2023, 4:26 a.m. OK GNU C++17 (64) TESTS 10 31 819200
224554465 magic_dream E Sept. 22, 2023, 4:03 a.m. OK GNU C++17 (64) TESTS 10 31 1638400
224546859 SugarT E Sept. 22, 2023, 2:14 a.m. OK GNU C++17 (64) TESTS 10 31 1638400
224533623 Kazi_Naiyem E Sept. 21, 2023, 9:21 p.m. OK GNU C++17 (64) TESTS 10 31 1638400
224527010 Cyoan E Sept. 21, 2023, 7:50 p.m. OK GNU C++17 (64) TESTS 10 31 1638400
224536530 omar_mahmoud1 E Sept. 21, 2023, 10:26 p.m. OK GNU C++17 (64) TESTS 10 31 1740800
224557782 FLOWPOWER E Sept. 22, 2023, 4:50 a.m. OK GNU C++17 (64) TESTS 10 31 3174400
224546453 takeyeldean E Sept. 22, 2023, 2:08 a.m. OK GNU C++17 (64) TESTS 10 46 819200
224552854 alicetheprincess E Sept. 22, 2023, 3:47 a.m. OK GNU C++17 (64) TESTS 10 46 819200
224547791 NinhNoLuv E Sept. 22, 2023, 2:29 a.m. OK GNU C++20 (64) TESTS 10 30 1638400
224560683 S360 E Sept. 22, 2023, 5:26 a.m. OK GNU C++20 (64) TESTS 10 31 819200
224558571 JianrongHai E Sept. 22, 2023, 5 a.m. OK GNU C++20 (64) TESTS 10 31 819200
224556894 qwertyuiop. E Sept. 22, 2023, 4:39 a.m. OK GNU C++20 (64) TESTS 10 31 819200
224556457 stop E Sept. 22, 2023, 4:33 a.m. OK GNU C++20 (64) TESTS 10 31 819200
224556002 Daylight_666 E Sept. 22, 2023, 4:26 a.m. OK GNU C++20 (64) TESTS 10 31 819200
224555924 Daylight_666 E Sept. 22, 2023, 4:25 a.m. OK GNU C++20 (64) TESTS 10 31 819200
224563612 paren7 E Sept. 22, 2023, 5:56 a.m. OK GNU C++20 (64) TESTS 10 31 819200
224561946 YisrT3 E Sept. 22, 2023, 5:39 a.m. OK GNU C++20 (64) TESTS 10 31 819200
224561162 Dorayakiee_Fan E Sept. 22, 2023, 5:31 a.m. OK GNU C++20 (64) TESTS 10 31 819200
224558822 79209748 E Sept. 22, 2023, 5:03 a.m. OK Go TESTS 10 46 1638400
224555690 katomasao E Sept. 22, 2023, 4:22 a.m. OK Haskell TESTS 10 358 25190400
224532498 dark_rays E Sept. 21, 2023, 9:01 p.m. OK Java 11 TESTS 10 265 3174400
224545097 TJ_Codes E Sept. 22, 2023, 1:45 a.m. OK Java 11 TESTS 10 342 4915200
224558711 achal5623 E Sept. 22, 2023, 5:02 a.m. OK Java 11 TESTS 10 436 0
224539805 ddkdqs E Sept. 21, 2023, 11:54 p.m. OK Java 11 TESTS 10 436 0
224523298 ankitraj0551 E Sept. 21, 2023, 7:08 p.m. OK Java 11 TESTS 10 451 0
224523221 ankitraj0551 E Sept. 21, 2023, 7:07 p.m. OK Java 11 TESTS 10 451 0
224530412 Omar.Asaad E Sept. 21, 2023, 8:30 p.m. OK Java 11 TESTS 10 514 0
224516101 maurya.rahul682 E Sept. 21, 2023, 6:05 p.m. OK Java 17 TESTS 10 217 4300800
224524034 daksh_02 E Sept. 21, 2023, 7:16 p.m. OK Java 17 TESTS 10 233 3481600
224542287 hamossa E Sept. 22, 2023, 12:51 a.m. OK Java 17 TESTS 10 233 5222400
224558119 vikash_45 E Sept. 22, 2023, 4:55 a.m. OK Java 17 TESTS 10 234 4300800
224517349 Pradeep880 E Sept. 21, 2023, 6:15 p.m. OK Java 17 TESTS 10 234 4403200
224551226 idonthatephy E Sept. 22, 2023, 3:23 a.m. OK Java 17 TESTS 10 249 3993600
224543157 vikash_45 E Sept. 22, 2023, 1:09 a.m. OK Java 17 TESTS 10 280 4608000
224520805 dzhi E Sept. 21, 2023, 6:43 p.m. OK Java 17 TESTS 10 280 5632000
224529868 dev22_sharma E Sept. 21, 2023, 8:23 p.m. OK Java 17 TESTS 10 436 819200
224540950 hualuoQAQ E Sept. 22, 2023, 12:23 a.m. OK Java 17 TESTS 10 451 1024000
224530860 karanprasad2121 E Sept. 21, 2023, 8:36 p.m. OK Java 21 TESTS 10 545 0
224537198 sary-bala E Sept. 21, 2023, 10:41 p.m. OK Java 8 TESTS 10 109 0
224531475 Safawt E Sept. 21, 2023, 8:46 p.m. OK Java 8 TESTS 10 139 11059200
224518474 Yousef_Badr E Sept. 21, 2023, 6:24 p.m. OK Java 8 TESTS 10 140 11059200
224531684 ZakiKurdya E Sept. 21, 2023, 8:49 p.m. OK Java 8 TESTS 10 170 11059200
224521275 Sumitsingh7 E Sept. 21, 2023, 6:47 p.m. OK Java 8 TESTS 10 187 7475200
224547807 Autunomy E Sept. 22, 2023, 2:30 a.m. OK Java 8 TESTS 10 187 11059200
224552461 Sri_ram_Prasad_01 E Sept. 22, 2023, 3:41 a.m. OK Java 8 TESTS 10 373 0
224532936 Artem533 E Sept. 21, 2023, 9:09 p.m. OK Java 8 TESTS 10 373 0
224522355 Toosid E Sept. 21, 2023, 6:58 p.m. OK Java 8 TESTS 10 374 0
224545681 xianglihua E Sept. 22, 2023, 1:56 a.m. OK Java 8 TESTS 10 389 0
224533553 Alexit E Sept. 21, 2023, 9:20 p.m. OK MS C++ 2017 TESTS 10 139 819200
224559446 Vivian9950 E Sept. 22, 2023, 5:11 a.m. OK MS C++ 2017 TESTS 10 155 819200
224552463 15988190152 E Sept. 22, 2023, 3:42 a.m. OK MS C++ 2017 TESTS 10 156 819200
224539025 HernandezFHH2004 E Sept. 21, 2023, 11:31 p.m. OK MS C++ 2017 TESTS 10 156 1638400
224545957 YMSeah E Sept. 22, 2023, 2 a.m. OK PyPy 3 TESTS 10 358 16691200
224561561 Rache_Bartmoss E Sept. 22, 2023, 5:35 a.m. OK PyPy 3 TESTS 10 420 16179200
224561461 Rache_Bartmoss E Sept. 22, 2023, 5:34 a.m. OK PyPy 3 TESTS 10 436 16179200
224523127 yvovaa E Sept. 21, 2023, 7:06 p.m. OK PyPy 3 TESTS 10 514 18022400
224534274 samliu12 E Sept. 21, 2023, 9:33 p.m. OK PyPy 3 TESTS 10 545 19456000
224518482 Shadow___Monarch E Sept. 21, 2023, 6:24 p.m. OK PyPy 3 TESTS 10 576 19148800
224518326 Shadow___Monarch E Sept. 21, 2023, 6:23 p.m. OK PyPy 3 TESTS 10 577 18636800
224517657 DRDIV E Sept. 21, 2023, 6:17 p.m. OK PyPy 3 TESTS 10 748 17817600
224520749 Antonio_Colapso_07 E Sept. 21, 2023, 6:42 p.m. OK PyPy 3 TESTS 10 951 18534400
224543832 Solaca E Sept. 22, 2023, 1:22 a.m. OK PyPy 3-64 TESTS 10 124 31539200
224525219 DeepJ E Sept. 21, 2023, 7:28 p.m. OK PyPy 3-64 TESTS 10 124 33075200
224561192 conqueror_of_tourist E Sept. 22, 2023, 5:31 a.m. OK PyPy 3-64 TESTS 10 140 25702400
224523356 stand_by E Sept. 21, 2023, 7:08 p.m. OK PyPy 3-64 TESTS 10 140 29184000
224538481 HaonnoaH E Sept. 21, 2023, 11:17 p.m. OK PyPy 3-64 TESTS 10 155 31539200
224560010 sravansainath7980 E Sept. 22, 2023, 5:18 a.m. OK PyPy 3-64 TESTS 10 170 32768000
224520963 gardengnome E Sept. 21, 2023, 6:44 p.m. OK PyPy 3-64 TESTS 10 171 23347200
224515926 I_Am_That E Sept. 21, 2023, 6:04 p.m. OK PyPy 3-64 TESTS 10 171 27136000
224530438 aayush_chhabra E Sept. 21, 2023, 8:30 p.m. OK PyPy 3-64 TESTS 10 171 28057600
224519083 Adeer_Bakht E Sept. 21, 2023, 6:29 p.m. OK PyPy 3-64 TESTS 10 202 28774400
224555594 Crimsonlethe E Sept. 22, 2023, 4:21 a.m. OK Python 3 TESTS 10 171 26214400
224529122 sourabh_27 E Sept. 21, 2023, 8:13 p.m. OK Python 3 TESTS 10 171 26214400
224560256 victor_chaz22 E Sept. 22, 2023, 5:21 a.m. OK Python 3 TESTS 10 296 27340800
224517855 layzer E Sept. 21, 2023, 6:19 p.m. OK Python 3 TESTS 10 389 26316800
224559116 codeurway_codeforces E Sept. 22, 2023, 5:07 a.m. OK Python 3 TESTS 10 670 26828800
224556667 vasudha_1610 E Sept. 22, 2023, 4:36 a.m. OK Python 3 TESTS 10 686 26214400
224542814 ONLY_ANAS E Sept. 22, 2023, 1:02 a.m. OK Python 3 TESTS 10 686 28672000
224529311 Saitejabojja5553 E Sept. 21, 2023, 8:16 p.m. OK Python 3 TESTS 10 810 26214400
224524771 krusher1 E Sept. 21, 2023, 7:24 p.m. OK Python 3 TESTS 10 858 26316800
224526581 Gau.Sh. E Sept. 21, 2023, 7:45 p.m. OK Python 3 TESTS 10 967 26214400
224518750 0x81 E Sept. 21, 2023, 6:26 p.m. OK Ruby 3 TESTS 10 670 14950400
224518254 0x81 E Sept. 21, 2023, 6:22 p.m. OK Ruby 3 TESTS 10 748 21299200

remove filters

Back to search problems