Educational Codeforces Round 125 (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
1657 Educational Codeforces Round 125 (Rated for Div. 2) FINISHED False 7200 83862899 March 22, 2022, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4924 ) D For Gamers. By Gamers. PROGRAMMING binary search dp math sortings two pointers

B"Monocarp is playing a strategy game. In the game, he recruits a squad to fight monsters. Before each battle, Monocarp has C coins to spend on his squad. Before each battle starts, his squad is empty. Monocarp chooses one type of units and recruits no more units of that type than he can recruit with C coins. There are n types of units. Every unit type has three parameters: Monocarp has to face m monsters. Every monster has two parameters: Monocarp has to fight only the j -th monster during the j -th battle. He wants all his recruited units to stay alive. Both Monocarp's squad and the monster attack continuously (not once per second) and at the same time. Thus, Monocarp wins the battle if and only if his squad kills the monster strictly faster than the monster kills one of his units. The time is compared with no rounding. For each monster, Monocarp wants to know the minimum amount of coins he has to spend to kill that monster. If this amount is greater than C , then report that it's impossible to kill that monster. The first line contains two integers n and C ( 1 <= n <= 3 cdot 10^5 ; 1 <= C <= 10^6 ) -- the number of types of units and the amount of coins Monocarp has before each battle. The i -th of the next n lines contains three integers c_i, d_i and h_i ( 1 <= c_i <= C ; 1 <= d_i, h_i <= 10^6 ). The next line contains a single integer m ( 1 <= m <= 3 cdot 10^5 ) -- the number of monsters that Monocarp has to face. The j -th of the next m lines contains two integers D_j and H_j ( 1 <= D_j <= 10^6 ; 1 <= H_j <= 10^{12} ). Print m integers. For each monster, print the minimum amount of coins Monocarp has to spend to kill that monster. If this amount is greater than C , then print -1 . Consider the first monster of the first example. Monocarp can't recruit one unit of the first type, beca"...

Tutorials

101161

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
150560557 Shukuang D March 23, 2022, 1:21 a.m. OK Clang++17 Diagnostics TESTS 132 2370 8192000
150545204 eastnman D March 22, 2022, 7:30 p.m. OK Delphi TESTS 132 1122 44134400
150611159 chro4896 D March 23, 2022, 1:09 p.m. OK GNU C11 TESTS 132 1684 11571200
150623764 Dipressible D March 23, 2022, 3:01 p.m. OK GNU C11 TESTS 132 1715 7987200
150587840 qscfthmko147 D March 23, 2022, 8:48 a.m. OK GNU C11 TESTS 132 1809 7987200
150588503 qscfthmko147 D March 23, 2022, 8:56 a.m. OK GNU C11 TESTS 132 1824 7987200
150588319 qscfthmko147 D March 23, 2022, 8:53 a.m. OK GNU C11 TESTS 132 1825 7987200
150587274 qscfthmko147 D March 23, 2022, 8:42 a.m. OK GNU C11 TESTS 132 2011 7987200
150667748 Asphyxia_ D March 24, 2022, 4:51 a.m. OK GNU C++14 TESTS 132 561 16076800
150588771 hanzug D March 23, 2022, 8:59 a.m. OK GNU C++14 TESTS 132 561 16076800
150562689 Aurora. D March 23, 2022, 2:21 a.m. OK GNU C++14 TESTS 132 577 16076800
150657271 mohen D March 23, 2022, 11:55 p.m. OK GNU C++14 TESTS 132 577 24064000
150577117 a18876561804 D March 23, 2022, 6:37 a.m. OK GNU C++14 TESTS 132 592 7987200
150665663 closed_doors D March 24, 2022, 4:06 a.m. OK GNU C++14 TESTS 132 592 16384000
150559912 eecs D March 23, 2022, 1 a.m. OK GNU C++14 TESTS 132 592 19660800
150656151 Havoc_01 D March 23, 2022, 11:15 p.m. OK GNU C++14 TESTS 132 592 26419200
150559918 wushi555 D March 23, 2022, 1 a.m. OK GNU C++14 TESTS 132 607 24064000
150566197 DarksideForChen D March 23, 2022, 3:44 a.m. OK GNU C++14 TESTS 132 608 24985600
150570214 -Samuel D March 23, 2022, 4:59 a.m. OK GNU C++17 TESTS 132 405 47616000
150605003 fhqTreap D March 23, 2022, 12:03 p.m. OK GNU C++17 TESTS 132 467 15667200
150598813 SOWFELICITY D March 23, 2022, 11 a.m. OK GNU C++17 TESTS 132 561 15974400
150596246 JL_Coder D March 23, 2022, 10:31 a.m. OK GNU C++17 TESTS 132 576 16076800
150595190 NULL0x7f D March 23, 2022, 10:18 a.m. OK GNU C++17 TESTS 132 577 88166400
150582304 SunSea_W D March 23, 2022, 7:38 a.m. OK GNU C++17 TESTS 132 592 16076800
150582579 i_oo_i D March 23, 2022, 7:42 a.m. OK GNU C++17 TESTS 132 592 16076800
150585595 TimWang D March 23, 2022, 8:22 a.m. OK GNU C++17 TESTS 132 592 22016000
150560762 jiagengchang D March 23, 2022, 1:27 a.m. OK GNU C++17 TESTS 132 592 29696000
150560641 jiagengchang D March 23, 2022, 1:24 a.m. OK GNU C++17 TESTS 132 592 40960000
150588636 Raven7959 D March 23, 2022, 8:57 a.m. OK GNU C++17 (64) TESTS 132 405 30515200
150562881 fxhd D March 23, 2022, 2:26 a.m. OK GNU C++17 (64) TESTS 132 405 34508800
150619217 EZiganshin D March 23, 2022, 2:21 p.m. OK GNU C++17 (64) TESTS 132 421 23244800
150578291 NinjaSenpai D March 23, 2022, 6:51 a.m. OK GNU C++17 (64) TESTS 132 436 15257600
150650633 ljuba D March 23, 2022, 9 p.m. OK GNU C++17 (64) TESTS 132 436 15257600
150615647 pavankalyanpallapolu D March 23, 2022, 1:49 p.m. OK GNU C++17 (64) TESTS 132 436 19558400
150633514 happy1237 D March 23, 2022, 4:59 p.m. OK GNU C++17 (64) TESTS 132 452 12800000
150574908 YYYLLL2021 D March 23, 2022, 6:11 a.m. OK GNU C++17 (64) TESTS 132 452 24064000
150581673 raj1307 D March 23, 2022, 7:31 a.m. OK GNU C++17 (64) TESTS 132 452 28057600
150590763 BigDelta D March 23, 2022, 9:21 a.m. OK GNU C++17 (64) TESTS 132 467 7987200
150552767 motorcycle D March 22, 2022, 9:38 p.m. OK GNU C++20 (64) TESTS 132 342 16076800
150577553 mdstoy D March 23, 2022, 6:42 a.m. OK GNU C++20 (64) TESTS 132 358 10444800
150631472 harpreet1237 D March 23, 2022, 4:31 p.m. OK GNU C++20 (64) TESTS 132 358 12800000
150569907 Dzzd D March 23, 2022, 4:54 a.m. OK GNU C++20 (64) TESTS 132 358 16076800
150567254 sky123 D March 23, 2022, 4:06 a.m. OK GNU C++20 (64) TESTS 132 358 20889600
150662884 Accept_automaton D March 24, 2022, 2:54 a.m. OK GNU C++20 (64) TESTS 132 358 42598400
150576729 avatsavirsa D March 23, 2022, 6:32 a.m. OK GNU C++20 (64) TESTS 132 373 16076800
150596582 codebuster_10 D March 23, 2022, 10:35 a.m. OK GNU C++20 (64) TESTS 132 373 20889600
150548992 KalbAsad D March 22, 2022, 8:27 p.m. OK GNU C++20 (64) TESTS 132 374 7987200
150636440 SkyDreams D March 23, 2022, 5:34 p.m. OK GNU C++20 (64) TESTS 132 374 7987200
150579666 chiendo97 D March 23, 2022, 7:07 a.m. OK Go TESTS 132 1918 17305600
150574851 Atuer D March 23, 2022, 6:10 a.m. OK Java 11 TESTS 132 904 7065600
150570250 gaju321 D March 23, 2022, 4:59 a.m. OK Java 11 TESTS 132 935 8806400
150611292 umanggupta1975 D March 23, 2022, 1:11 p.m. OK Java 11 TESTS 132 936 8601600
150618093 Ian_Nepomniachtchi D March 23, 2022, 2:10 p.m. OK Java 11 TESTS 132 966 7270400
150568515 gaju321 D March 23, 2022, 4:30 a.m. OK Java 11 TESTS 132 997 8806400
150553071 LongWalk D March 22, 2022, 9:45 p.m. OK Java 11 TESTS 132 998 16691200
150608795 aayushdhakad D March 23, 2022, 12:42 p.m. OK Java 11 TESTS 132 1014 10137600
150575866 __Serendipity D March 23, 2022, 6:22 a.m. OK Java 11 TESTS 132 1060 7168000
150542701 Restricted D March 22, 2022, 6:56 p.m. OK Java 11 TESTS 132 1060 16896000
150618057 Yuki_B D March 23, 2022, 2:10 p.m. OK Java 11 TESTS 132 1731 22937600
150569902 harshsingla06 D March 23, 2022, 4:54 a.m. OK Java 8 TESTS 132 794 14131200
150538468 Omar_Mohammad D March 22, 2022, 6:04 p.m. OK Java 8 TESTS 132 810 5836800
150577571 tanishq044 D March 23, 2022, 6:42 a.m. OK Java 8 TESTS 132 841 11264000
150569420 ak_ankit D March 23, 2022, 4:46 a.m. OK Java 8 TESTS 132 888 7475200
150627259 aggarwalanshul01 D March 23, 2022, 3:39 p.m. OK Java 8 TESTS 132 935 12185600
150664867 cptodev D March 24, 2022, 3:48 a.m. OK Java 8 TESTS 132 997 17203200
150555186 code-n-roll D March 22, 2022, 10:39 p.m. OK Java 8 TESTS 132 1590 17510400
150545698 Abdallah_Ragab00 D March 22, 2022, 7:38 p.m. OK Java 8 TESTS 132 2012 111718400
150581276 kishan963 D March 23, 2022, 7:26 a.m. OK Java 8 TESTS 132 2386 147865600
150583215 natsu243 D March 23, 2022, 7:51 a.m. OK Java 8 TESTS 132 2433 8192000
150568493 F_Rio D March 23, 2022, 4:29 a.m. OK MS C++ 2017 TESTS 132 826 40038400
150563324 EmiteInna D March 23, 2022, 2:38 a.m. OK MS C++ 2017 TESTS 132 873 7987200
150583558 Cx330_L D March 23, 2022, 7:55 a.m. OK MS C++ 2017 TESTS 132 1372 24883200
150615490 Sagidullca D March 23, 2022, 1:48 p.m. OK MS C++ 2017 TESTS 132 1669 7987200
150563131 xzzzzz D March 23, 2022, 2:33 a.m. OK MS C++ 2017 TESTS 132 1840 16076800
150543061 fatant D March 22, 2022, 7 p.m. OK MS C++ 2017 TESTS 132 2090 15257600
150552068 machine_solution D March 22, 2022, 9:24 p.m. OK MS C++ 2017 TESTS 132 2090 20275200
150552787 Prostoegor239 D March 22, 2022, 9:39 p.m. OK MS C++ 2017 TESTS 132 2682 18022400
150642846 Alexey D March 23, 2022, 6:55 p.m. OK MS C++ 2017 TESTS 132 2761 116121600
150550207 hxu10 D March 22, 2022, 8:49 p.m. OK PyPy 3-64 TESTS 132 748 60928000
150563244 yjgwak.cs D March 23, 2022, 2:36 a.m. OK PyPy 3-64 TESTS 132 826 45158400
150550230 hxu10 D March 22, 2022, 8:49 p.m. OK PyPy 3-64 TESTS 132 826 74444800
150649654 KingMace D March 23, 2022, 8:43 p.m. OK PyPy 3-64 TESTS 132 841 26419200
150603319 xabialonso14 D March 23, 2022, 11:46 a.m. OK PyPy 3-64 TESTS 132 842 57344000
150549697 hxu10 D March 22, 2022, 8:40 p.m. OK PyPy 3-64 TESTS 132 842 73830400
150549191 akshitm16 D March 22, 2022, 8:30 p.m. OK PyPy 3-64 TESTS 132 873 66867200
150552225 tcltk D March 22, 2022, 9:28 p.m. OK PyPy 3-64 TESTS 132 982 94310400
150624768 beethoven97 D March 23, 2022, 3:11 p.m. OK PyPy 3-64 TESTS 132 1013 60211200
150539196 beethoven97 D March 22, 2022, 6:12 p.m. OK PyPy 3-64 TESTS 132 1028 65536000
150589096 Spheniscine D March 23, 2022, 9:02 a.m. OK Rust 2021 TESTS 132 358 15462400
150557183 Spheniscine D March 22, 2022, 11:39 p.m. OK Rust 2021 TESTS 132 421 15462400
150627041 46hinat D March 23, 2022, 3:36 p.m. OK Rust 2021 TESTS 132 717 44236800
150608640 apilat D March 23, 2022, 12:40 p.m. OK Rust 2021 TESTS 132 873 27340800

remove filters

Back to search problems