Codeforces Round 746 (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
1592 Codeforces Round 746 (Div. 2) FINISHED False 7200 103994663 Oct. 3, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 22600 ) A Gamer Hemose PROGRAMMING greedy math sortings

B'One day, Ahmed_Hossam went to Hemose and said "Let 's solve a gym contest!". Hemose didn 't want to do that, as he was playing Valorant, so he came up with a problem and told it to Ahmed to distract him. Sadly, Ahmed can 't solve it... Could you help him? There is an Agent in Valorant, and he has n weapons. The i -th weapon has a damage value a_i , and the Agent will face an enemy whose health value is H . The Agent will perform one or more moves until the enemy dies. In one move, he will choose a weapon and decrease the enemy 's health by its damage value. The enemy will die when his health will become less than or equal to 0 . However, not everything is so easy: the Agent can 't choose the same weapon for 2 times in a row. What is the minimum number of times that the Agent will need to use the weapons to kill the enemy? Each test contains multiple test cases. The first line contains the number of test cases t (1 <= q t <= q 10^5) . Description of the test cases follows. The first line of each test case contains two integers n and H (2 <= q n <= q 10^3, 1 <= q H <= q 10^9) -- the number of available weapons and the initial health value of the enemy. The second line of each test case contains n integers a_1, a_2, ldots, a_n (1 <= q a_i <= q 10^9) -- the damage values of the weapons. It 's guaranteed that the sum of n over all test cases doesn 't exceed 2 cdot 10^5 . For each test case, print a single integer -- the minimum number of times that the Agent will have to use the weapons to kill the enemy. In the first test case, the Agent can use the second weapon, making health value of the enemy equal to 4-7=-3 . -3 <= 0 , so the enemy is dead, and using weapon 1 time was enough. In the second test case, the Agent can use the first weapon first, and then the second one. After this, the health of enemy will drop to 6-4-2 = 0 , meaning he would be kille'...

Tutorials

95583

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
130725605 nikhil_sai_v A Oct. 3, 2021, 5:16 p.m. OK GNU C11 TESTS 6 93 3686400
130762618 liong A Oct. 4, 2021, 6:01 a.m. OK GNU C11 TESTS 6 108 3686400
130753889 20101111 A Oct. 4, 2021, 3:38 a.m. OK GNU C11 TESTS 6 109 3686400
130719142 tazrian_tahlil A Oct. 3, 2021, 4:26 p.m. OK GNU C11 TESTS 6 109 3686400
130749465 Youarenotgood A Oct. 4, 2021, 2:17 a.m. OK GNU C11 TESTS 6 156 3686400
130717886 harshulmidha A Oct. 3, 2021, 4:22 p.m. OK GNU C11 TESTS 6 171 3686400
130729597 xiaoziyao A Oct. 3, 2021, 5:59 p.m. OK GNU C++14 TESTS 6 31 3686400
130718288 v01d_p0150n A Oct. 3, 2021, 4:23 p.m. OK GNU C++14 TESTS 6 31 3686400
130754239 anish_kr_jha A Oct. 4, 2021, 3:45 a.m. OK GNU C++14 TESTS 6 31 3686400
130728682 f1coder A Oct. 3, 2021, 5:49 p.m. OK GNU C++14 TESTS 6 46 102400
130732740 Sunjaree A Oct. 3, 2021, 6:39 p.m. OK GNU C++14 TESTS 6 46 204800
130732714 die_asshole A Oct. 3, 2021, 6:39 p.m. OK GNU C++14 TESTS 6 46 204800
130753900 lmpars A Oct. 4, 2021, 3:38 a.m. OK GNU C++14 TESTS 6 46 3686400
130752902 Sunny_days A Oct. 4, 2021, 3:20 a.m. OK GNU C++14 TESTS 6 46 3686400
130759277 merc_01 A Oct. 4, 2021, 5:11 a.m. OK GNU C++14 TESTS 6 46 3686400
130753997 lmpars A Oct. 4, 2021, 3:41 a.m. OK GNU C++14 TESTS 6 46 3686400
130752719 bluesky111 A Oct. 4, 2021, 3:17 a.m. OK GNU C++17 TESTS 6 15 4608000
130727984 samarpitdua24 A Oct. 3, 2021, 5:42 p.m. OK GNU C++17 TESTS 6 31 3686400
130722253 Night_Killer A Oct. 3, 2021, 4:34 p.m. OK GNU C++17 TESTS 6 31 3686400
130749435 Dreamfarer A Oct. 4, 2021, 2:16 a.m. OK GNU C++17 TESTS 6 31 3788800
130755813 sj17031703 A Oct. 4, 2021, 4:14 a.m. OK GNU C++17 TESTS 6 31 3891200
130724833 fatmaashraf A Oct. 3, 2021, 5:10 p.m. OK GNU C++17 TESTS 6 31 4710400
130732696 alpha_pi A Oct. 3, 2021, 6:38 p.m. OK GNU C++17 TESTS 6 46 0
130748427 n00bl3t A Oct. 4, 2021, 1:58 a.m. OK GNU C++17 TESTS 6 46 0
130755110 itsme1234 A Oct. 4, 2021, 4:01 a.m. OK GNU C++17 TESTS 6 46 0
130755144 ishaanmandhar A Oct. 4, 2021, 4:01 a.m. OK GNU C++17 TESTS 6 46 0
130742486 arvindr9 A Oct. 3, 2021, 10:03 p.m. OK GNU C++17 (64) TESTS 6 30 4300800
130742648 jt.cheng26_orz A Oct. 3, 2021, 10:09 p.m. OK GNU C++17 (64) TESTS 6 30 4505600
130751649 ashu9993063472 A Oct. 4, 2021, 2:58 a.m. OK GNU C++17 (64) TESTS 6 31 0
130751080 Anisur_rahaman A Oct. 4, 2021, 2:46 a.m. OK GNU C++17 (64) TESTS 6 31 4300800
130750196 harsh_malik A Oct. 4, 2021, 2:30 a.m. OK GNU C++17 (64) TESTS 6 31 4300800
130751621 Bingoblin A Oct. 4, 2021, 2:57 a.m. OK GNU C++17 (64) TESTS 6 31 4300800
130754240 b2jena A Oct. 4, 2021, 3:45 a.m. OK GNU C++17 (64) TESTS 6 31 4300800
130757798 LostPrince A Oct. 4, 2021, 4:47 a.m. OK GNU C++17 (64) TESTS 6 31 4300800
130762026 dev6251 A Oct. 4, 2021, 5:53 a.m. OK GNU C++17 (64) TESTS 6 31 4300800
130762108 Krug129 A Oct. 4, 2021, 5:54 a.m. OK GNU C++17 (64) TESTS 6 31 4300800
130739052 aozeritsky A Oct. 3, 2021, 8:30 p.m. OK Haskell TESTS 6 452 11571200
130754149 nitin23329 A Oct. 4, 2021, 3:43 a.m. OK Java 11 TESTS 6 186 23961600
130733071 solo07 A Oct. 3, 2021, 6:44 p.m. OK Java 11 TESTS 6 202 23859200
130753503 sumitchavan A Oct. 4, 2021, 3:31 a.m. OK Java 11 TESTS 6 202 23859200
130715153 gourav02 A Oct. 3, 2021, 4:14 p.m. OK Java 11 TESTS 6 202 24268800
130724208 iamsoumik A Oct. 3, 2021, 5:07 p.m. OK Java 11 TESTS 6 217 23859200
130730759 skhammad A Oct. 3, 2021, 6:12 p.m. OK Java 11 TESTS 6 218 23859200
130760636 CrinklyGolem A Oct. 4, 2021, 5:32 a.m. OK Java 11 TESTS 6 218 23859200
130732084 jod_07 A Oct. 3, 2021, 6:29 p.m. OK Java 11 TESTS 6 218 23859200
130757878 ayush__1411 A Oct. 4, 2021, 4:48 a.m. OK Java 11 TESTS 6 234 23859200
130757320 unfixedbug A Oct. 4, 2021, 4:39 a.m. OK Java 11 TESTS 6 249 23859200
130725164 darshan287 A Oct. 3, 2021, 5:13 p.m. OK Java 8 TESTS 6 124 21094400
130761097 Ibrahimovic_The_Lion A Oct. 4, 2021, 5:38 a.m. OK Java 8 TESTS 6 140 20480000
130724595 less_ordinary A Oct. 3, 2021, 5:09 p.m. OK Java 8 TESTS 6 140 20787200
130755319 _robindhankhar A Oct. 4, 2021, 4:05 a.m. OK Java 8 TESTS 6 155 20172800
130754105 gssakash A Oct. 4, 2021, 3:42 a.m. OK Java 8 TESTS 6 155 20582400
130720944 gyanrebind4u A Oct. 3, 2021, 4:31 p.m. OK Java 8 TESTS 6 155 20889600
130760879 Ibrahimovic_The_Lion A Oct. 4, 2021, 5:35 a.m. OK Java 8 TESTS 6 170 20889600
130728954 Restricted A Oct. 3, 2021, 5:51 p.m. OK Java 8 TESTS 6 171 20889600
130755490 Srikanth1777 A Oct. 4, 2021, 4:08 a.m. OK Java 8 TESTS 6 187 61644800
130739020 netos36 A Oct. 3, 2021, 8:29 p.m. OK Java 8 TESTS 6 264 20582400
130741038 nhanquyentran1 A Oct. 3, 2021, 9:20 p.m. OK Kotlin 1.4 TESTS 6 280 23040000
130732907 Bisquito A Oct. 3, 2021, 6:42 p.m. OK Kotlin 1.4 TESTS 6 373 23347200
130762334 Nebulaxin A Oct. 4, 2021, 5:57 a.m. OK Mono C# TESTS 6 264 11878400
130753985 sgly33 A Oct. 4, 2021, 3:40 a.m. OK MS C++ 2017 TESTS 6 62 3686400
130753572 wangzhuoyue A Oct. 4, 2021, 3:32 a.m. OK MS C++ 2017 TESTS 6 62 3788800
130762342 UnHingedFrog A Oct. 4, 2021, 5:57 a.m. OK MS C++ 2017 TESTS 6 156 4505600
130762730 swz A Oct. 4, 2021, 6:02 a.m. OK MS C++ 2017 TESTS 6 171 5324800
130754710 NoiseLess A Oct. 4, 2021, 3:54 a.m. OK MS C++ 2017 TESTS 6 187 3686400
130739292 Eldies A Oct. 3, 2021, 8:35 p.m. OK MS C++ 2017 TESTS 6 202 3686400
130727740 Tangerine A Oct. 3, 2021, 5:39 p.m. OK MS C++ 2017 TESTS 6 202 3686400
130734316 JohnCode A Oct. 3, 2021, 7:03 p.m. OK MS C++ 2017 TESTS 6 202 3788800
130734415 JohnCode A Oct. 3, 2021, 7:05 p.m. OK MS C++ 2017 TESTS 6 217 3788800
130714711 bgugu18 A Oct. 3, 2021, 4:13 p.m. OK MS C++ 2017 TESTS 6 218 4403200
130761689 Nebulaxin A Oct. 4, 2021, 5:47 a.m. OK .NET Core C# TESTS 6 233 14540800
130741178 acorn11 A Oct. 3, 2021, 9:24 p.m. OK PyPy 2 TESTS 6 296 25702400
130730235 jano31415 A Oct. 3, 2021, 6:06 p.m. OK PyPy 3 TESTS 6 171 25088000
130743769 radoan.sharkar.richi A Oct. 3, 2021, 10:48 p.m. OK PyPy 3 TESTS 6 186 26419200
130715142 peakyfuckingblinder A Oct. 3, 2021, 4:14 p.m. OK PyPy 3 TESTS 6 187 159129600
130726737 ca3sar A Oct. 3, 2021, 5:30 p.m. OK PyPy 3 TESTS 6 218 29593600
130735585 Munchy_1 A Oct. 3, 2021, 7:23 p.m. OK PyPy 3 TESTS 6 265 26009600
130725671 Soumik43 A Oct. 3, 2021, 5:17 p.m. OK PyPy 3 TESTS 6 280 29593600
130761616 pedastrian57 A Oct. 4, 2021, 5:46 a.m. OK PyPy 3 TESTS 6 296 90726400
130755276 piSquared A Oct. 4, 2021, 4:04 a.m. OK PyPy 3 TESTS 6 311 29593600
130757806 ghoshashis545 A Oct. 4, 2021, 4:47 a.m. OK PyPy 3 TESTS 6 326 29491200
130724858 akshitm16 A Oct. 3, 2021, 5:11 p.m. OK PyPy 3 TESTS 6 327 29798400
130737952 tieros A Oct. 3, 2021, 8:09 p.m. OK Python 3 TESTS 6 140 6963200
130743757 radoan.sharkar.richi A Oct. 3, 2021, 10:48 p.m. OK Python 3 TESTS 6 171 8704000
130754483 Sujith_ A Oct. 4, 2021, 3:49 a.m. OK Python 3 TESTS 6 187 8704000
130715638 Antifreeze A Oct. 3, 2021, 4:16 p.m. OK Python 3 TESTS 6 264 7270400
130734496 the_emerging_coder A Oct. 3, 2021, 7:06 p.m. OK Python 3 TESTS 6 264 7372800
130736923 D_Dima A Oct. 3, 2021, 7:49 p.m. OK Python 3 TESTS 6 280 7270400
130735084 kushkumar27 A Oct. 3, 2021, 7:16 p.m. OK Python 3 TESTS 6 280 7270400
130745923 Mohan27 A Oct. 4, 2021, 12:24 a.m. OK Python 3 TESTS 6 295 6963200
130760702 Aryan28 A Oct. 4, 2021, 5:33 a.m. OK Python 3 TESTS 6 295 7270400
130745730 namans777 A Oct. 4, 2021, 12:16 a.m. OK Python 3 TESTS 6 295 7270400
130728103 Ahmed_M_Abdelhamed A Oct. 3, 2021, 5:43 p.m. OK Rust TESTS 6 124 3788800
130727052 Ahmed_M_Abdelhamed A Oct. 3, 2021, 5:33 p.m. OK Rust TESTS 6 186 3788800
130728047 Ahmed_M_Abdelhamed A Oct. 3, 2021, 5:42 p.m. OK Rust TESTS 6 218 3788800
130734104 IvanDyachenko A Oct. 3, 2021, 6:59 p.m. OK Scala TESTS 6 576 39731200

remove filters

Back to search problems