Educational Codeforces Round 127 (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
1671 Educational Codeforces Round 127 (Rated for Div. 2) FINISHED False 7200 81185099 April 22, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17481 ) C Dolce Vita PROGRAMMING binary search brute force greedy math #java

B"Turbulent times are coming, so you decided to buy sugar in advance. There are n shops around that sell sugar: the i -th shop sells one pack of sugar for a_i coins, but only one pack to one customer each day. So in order to buy several packs, you need to visit several shops. Another problem is that prices are increasing each day: during the first day the cost is a_i , during the second day cost is a_i + 1 , during the third day -- a_i + 2 and so on for each shop i . On the contrary, your everyday budget is only x coins. In other words, each day you go and buy as many packs as possible with total cost not exceeding x . Note that if you don't spend some amount of coins during a day, you can't use these coins during the next days. Eventually, the cost for each pack will exceed x , and you won't be able to buy even a single pack. So, how many packs will you be able to buy till that moment in total? The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. Next t cases follow. The first line of each test case contains two integers n and x ( 1 <= n <= 2 cdot 10^5 ; 1 <= x <= 10^9 ) -- the number of shops and your everyday budget. The second line of each test case contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ) -- the initial cost of one pack in each shop. It's guaranteed that the total sum of n doesn't exceed 2 cdot 10^5 . For each test case, print one integer -- the total number of packs you will be able to buy until prices exceed your everyday budget. In the first test case, In the second test case, prices are too high even at the first day, so you can't buy anything. In the third test case, you can buy only one pack at day one. In the fourth test case, you can buy 2 packs first 500 days. At day 501 prices are [501, 501] , so you can buy only 1 pack "...

Tutorials

102181

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
154587945 ruban C April 22, 2022, 6:28 p.m. OK Delphi TESTS 15 187 114688000
154585662 ruban C April 22, 2022, 5:59 p.m. OK Delphi TESTS 15 483 114688000
154595613 1435730 C April 22, 2022, 8:25 p.m. OK GNU C11 TESTS 15 46 819200
154791753 GTrigger C April 23, 2022, 9:43 p.m. OK GNU C11 TESTS 15 62 819200
154738292 fatherof0416 C April 23, 2022, 3:14 p.m. OK GNU C11 TESTS 15 62 921600
154791612 GTrigger C April 23, 2022, 9:40 p.m. OK GNU C11 TESTS 15 77 1638400
154639538 vjudge2 C April 23, 2022, 9:25 a.m. OK GNU C++14 TESTS 15 15 1638400
154639545 Tom66 C April 23, 2022, 9:25 a.m. OK GNU C++14 TESTS 15 30 1638400
154858733 win10 C April 24, 2022, 1:51 p.m. OK GNU C++14 TESTS 15 31 3686400
154638939 cunzai_zsy0531 C April 23, 2022, 9:19 a.m. OK GNU C++14 TESTS 15 31 4915200
154828027 myf C April 24, 2022, 8:43 a.m. OK GNU C++14 TESTS 15 31 18739200
154590198 Wizard_King C April 22, 2022, 7:01 p.m. OK GNU C++14 TESTS 15 46 819200
154608942 duoluoluo C April 23, 2022, 2:02 a.m. OK GNU C++14 TESTS 15 46 819200
154602840 omaraymanatia C April 22, 2022, 10:56 p.m. OK GNU C++14 TESTS 15 46 819200
154825019 yuluosheng C April 24, 2022, 8:12 a.m. OK GNU C++14 TESTS 15 46 1638400
154854947 vinay_24 C April 24, 2022, 1:14 p.m. OK GNU C++14 TESTS 15 46 1638400
154612524 jhc_123 C April 23, 2022, 3:27 a.m. OK GNU C++17 TESTS 15 31 16793600
154691040 kobeforces C April 23, 2022, 1:28 p.m. OK GNU C++17 TESTS 15 46 819200
154608191 notshenben C April 23, 2022, 1:42 a.m. OK GNU C++17 TESTS 15 46 819200
154597994 mnb C April 22, 2022, 9:01 p.m. OK GNU C++17 TESTS 15 46 819200
154597286 Kilani C April 22, 2022, 8:50 p.m. OK GNU C++17 TESTS 15 46 819200
154691129 fym C April 23, 2022, 1:29 p.m. OK GNU C++17 TESTS 15 46 819200
154828408 wush03 C April 24, 2022, 8:47 a.m. OK GNU C++17 TESTS 15 46 819200
154860531 0822 C April 24, 2022, 2:08 p.m. OK GNU C++17 TESTS 15 46 1638400
154772867 dogydevstorage C April 23, 2022, 5:15 p.m. OK GNU C++17 TESTS 15 46 2355200
154800597 fctee C April 24, 2022, 1:54 a.m. OK GNU C++17 TESTS 15 46 2457600
154889068 SoluckyBhavya9 C April 24, 2022, 8:39 p.m. OK GNU C++17 (64) TESTS 15 31 819200
154612187 Mikkely C April 23, 2022, 3:20 a.m. OK GNU C++17 (64) TESTS 15 31 819200
154687030 CatastrophicTyrant C April 23, 2022, 1:23 p.m. OK GNU C++17 (64) TESTS 15 31 1638400
154886953 MaryamTarek C April 24, 2022, 8:01 p.m. OK GNU C++17 (64) TESTS 15 31 1638400
154778972 AltManager C April 23, 2022, 6:19 p.m. OK GNU C++17 (64) TESTS 15 31 1638400
154634266 tditya_aeltia C April 23, 2022, 8:29 a.m. OK GNU C++17 (64) TESTS 15 31 1638400
154611158 tommyjiang C April 23, 2022, 2:56 a.m. OK GNU C++17 (64) TESTS 15 31 1638400
154588860 ankancool C April 22, 2022, 6:41 p.m. OK GNU C++17 (64) TESTS 15 31 1638400
154586102 Hanasaki C April 22, 2022, 6:05 p.m. OK GNU C++17 (64) TESTS 15 31 1638400
154596109 urBCI C April 22, 2022, 8:32 p.m. OK GNU C++17 (64) TESTS 15 31 2457600
154832889 ccttt C April 24, 2022, 9:36 a.m. OK GNU C++20 (64) TESTS 15 31 819200
154812287 Dingovinaa C April 24, 2022, 5:43 a.m. OK GNU C++20 (64) TESTS 15 31 819200
154805468 liwenqi C April 24, 2022, 3:46 a.m. OK GNU C++20 (64) TESTS 15 31 819200
154799819 _huge C April 24, 2022, 1:32 a.m. OK GNU C++20 (64) TESTS 15 31 819200
154797617 tyler C April 24, 2022, 12:23 a.m. OK GNU C++20 (64) TESTS 15 31 819200
154778268 Scorsese C April 23, 2022, 6:11 p.m. OK GNU C++20 (64) TESTS 15 31 819200
154686965 asmisha C April 23, 2022, 1:23 p.m. OK GNU C++20 (64) TESTS 15 31 819200
154677446 Menos C April 23, 2022, 1:10 p.m. OK GNU C++20 (64) TESTS 15 31 819200
154880581 dedman_av C April 24, 2022, 6:07 p.m. OK GNU C++20 (64) TESTS 15 31 819200
154847945 broken_bad C April 24, 2022, 12:08 p.m. OK GNU C++20 (64) TESTS 15 31 819200
154590023 koqo C April 22, 2022, 6:58 p.m. OK Go TESTS 15 186 4300800
154611665 bangbangwo C April 23, 2022, 3:08 a.m. OK Go TESTS 15 187 5632000
154691615 The_terminator C April 23, 2022, 1:35 p.m. OK Java 11 TESTS 15 202 0
154654193 1364354238zxd C April 23, 2022, 12:09 p.m. OK Java 11 TESTS 15 202 0
154625629 swarup_312 C April 23, 2022, 6:46 a.m. OK Java 11 TESTS 15 218 0
154644180 this_is_Shivesh C April 23, 2022, 10:16 a.m. OK Java 11 TESTS 15 233 102400
154598922 amritagg C April 22, 2022, 9:18 p.m. OK Java 11 TESTS 15 233 40448000
154639904 sh_myname C April 23, 2022, 9:29 a.m. OK Java 11 TESTS 15 234 0
154617114 the_unseen C April 23, 2022, 4:58 a.m. OK Java 11 TESTS 15 249 0
154845740 lavesh80 C April 24, 2022, 11:49 a.m. OK Java 11 TESTS 15 249 40345600
154831788 SJacob C April 24, 2022, 9:24 a.m. OK Java 11 TESTS 15 264 0
154832829 SJacob C April 24, 2022, 9:36 a.m. OK Java 11 TESTS 15 264 0
154634794 Main.Thread C April 23, 2022, 8:35 a.m. OK Java 8 TESTS 15 124 0
154803700 kevinqaq C April 24, 2022, 3:08 a.m. OK Java 8 TESTS 15 124 3072000
154840648 spiderwebs C April 24, 2022, 11:09 a.m. OK Java 8 TESTS 15 171 0
154820539 Sachin_2961 C April 24, 2022, 7:22 a.m. OK Java 8 TESTS 15 171 0
154699716 dingmingcheng C April 23, 2022, 2:12 p.m. OK Java 8 TESTS 15 171 2764800
154600228 AbdulazizHassan C April 22, 2022, 9:43 p.m. OK Java 8 TESTS 15 186 4403200
154873389 Shemo C April 24, 2022, 4:20 p.m. OK Java 8 TESTS 15 187 4403200
154639259 ss804 C April 23, 2022, 9:22 a.m. OK Java 8 TESTS 15 202 0
154640089 peterwayne C April 23, 2022, 9:31 a.m. OK Java 8 TESTS 15 202 4608000
154620605 govindrajput C April 23, 2022, 5:50 a.m. OK Java 8 TESTS 15 202 6041600
154833897 PeredurOmega C April 24, 2022, 9:48 a.m. OK Kotlin 1.4 TESTS 15 249 19558400
154859726 linxiaotian C April 24, 2022, 2 p.m. OK Kotlin 1.4 TESTS 15 343 7782400
154586353 ryanberg C April 22, 2022, 6:08 p.m. OK Kotlin 1.5 TESTS 15 405 8806400
154779122 Mbt925 C April 23, 2022, 6:20 p.m. OK Kotlin 1.6 TESTS 15 374 19558400
154650356 darkl0rd C April 23, 2022, 11:26 a.m. OK Kotlin 1.6 TESTS 15 421 20172800
154847274 Killer_No.47 C April 24, 2022, 12:02 p.m. OK MS C++ 2017 TESTS 15 62 1638400
154865956 deyilhou C April 24, 2022, 3:07 p.m. OK MS C++ 2017 TESTS 15 78 1638400
154610259 AIdancer C April 23, 2022, 2:34 a.m. OK MS C++ 2017 TESTS 15 78 2457600
154812579 emailam C April 24, 2022, 5:47 a.m. OK MS C++ 2017 TESTS 15 171 819200
154592909 mahmoud_saad C April 22, 2022, 7:43 p.m. OK MS C++ 2017 TESTS 15 187 819200
154645050 LSY530 C April 23, 2022, 10:26 a.m. OK MS C++ 2017 TESTS 15 202 819200
154588926 setsuna_suki C April 22, 2022, 6:42 p.m. OK MS C++ 2017 TESTS 15 202 1638400
154594380 Enternal C April 22, 2022, 8:07 p.m. OK MS C++ 2017 TESTS 15 202 1638400
154648986 lethanhminh0801 C April 23, 2022, 11:10 a.m. OK MS C++ 2017 TESTS 15 202 3174400
154634313 ArmoredTitan11651 C April 23, 2022, 8:30 a.m. OK MS C++ 2017 TESTS 15 202 3174400
154611968 chrisfcoder C April 23, 2022, 3:14 a.m. OK .NET Core C# TESTS 15 124 16588800
154637469 chinesedfan C April 23, 2022, 9:05 a.m. OK Node.js TESTS 15 249 16486400
154583915 1_2_3_4_5_9 C April 22, 2022, 5:38 p.m. OK PyPy 2 TESTS 15 171 24985600
154627612 Adolf988 C April 23, 2022, 7:07 a.m. OK PyPy 3 TESTS 15 170 19763200
154790559 NAVI_Perfecto C April 23, 2022, 9:19 p.m. OK PyPy 3 TESTS 15 187 21094400
154587872 kals C April 22, 2022, 6:28 p.m. OK PyPy 3 TESTS 15 280 15667200
154634954 sigilius C April 23, 2022, 8:37 a.m. OK PyPy 3 TESTS 15 280 19046400
154616189 Roches_bai C April 23, 2022, 4:43 a.m. OK PyPy 3 TESTS 15 312 19148800
154624163 hahalol123 C April 23, 2022, 6:30 a.m. OK PyPy 3 TESTS 15 326 23244800
154613823 Mr._Oogway C April 23, 2022, 3:56 a.m. OK PyPy 3 TESTS 15 327 22425600
154649594 Ayushman_123 C April 23, 2022, 11:17 a.m. OK PyPy 3 TESTS 15 420 25497600
154602979 YashNandwana C April 22, 2022, 11 p.m. OK PyPy 3 TESTS 15 451 24064000
154832187 grininja C April 24, 2022, 9:28 a.m. OK PyPy 3 TESTS 15 467 29798400
154623889 rivnam C April 23, 2022, 6:27 a.m. OK PyPy 3-64 TESTS 15 124 28262400
154586202 nitish420 C April 22, 2022, 6:06 p.m. OK PyPy 3-64 TESTS 15 124 28876800
154643902 sakshatmali C April 23, 2022, 10:13 a.m. OK PyPy 3-64 TESTS 15 155 24985600
154790834 notTehlka C April 23, 2022, 9:24 p.m. OK PyPy 3-64 TESTS 15 156 28262400
154626862 kaustavshouvik C April 23, 2022, 6:59 a.m. OK PyPy 3-64 TESTS 15 233 22323200
154594191 bollu C April 22, 2022, 8:03 p.m. OK PyPy 3-64 TESTS 15 233 26316800
154801976 noobsatish C April 24, 2022, 2:29 a.m. OK PyPy 3-64 TESTS 15 234 28467200
154781067 Bucher C April 23, 2022, 6:46 p.m. OK PyPy 3-64 TESTS 15 249 26624000
154614707 shiviDON C April 23, 2022, 4:14 a.m. OK PyPy 3-64 TESTS 15 249 26726400
154639102 mohamedsamirtkd C April 23, 2022, 9:21 a.m. OK PyPy 3-64 TESTS 15 249 26931200
154608246 SpeedFox198 C April 23, 2022, 1:43 a.m. OK Python 3 TESTS 15 233 15667200
154738523 chaitanya1540 C April 23, 2022, 3:14 p.m. OK Python 3 TESTS 15 249 15667200
154588918 ThanhDan C April 22, 2022, 6:42 p.m. OK Python 3 TESTS 15 264 15667200
154613716 just_chill_baby C April 23, 2022, 3:53 a.m. OK Python 3 TESTS 15 264 16076800
154620818 Abhay_-_-_-kumar C April 23, 2022, 5:52 a.m. OK Python 3 TESTS 15 265 15769600
154584058 sushantyerawar_2002 C April 22, 2022, 5:40 p.m. OK Python 3 TESTS 15 280 15667200
154598503 TheGirlNextDoor C April 22, 2022, 9:10 p.m. OK Python 3 TESTS 15 280 15769600
154636350 sushantyerawar_2002 C April 23, 2022, 8:52 a.m. OK Python 3 TESTS 15 296 15667200
154597093 Fachchef C April 22, 2022, 8:47 p.m. OK Python 3 TESTS 15 296 15974400
154609151 KK_1729 C April 23, 2022, 2:08 a.m. OK Python 3 TESTS 15 311 15769600
154787706 Hyrulia C April 23, 2022, 8:28 p.m. OK Rust 2021 TESTS 15 15 6656000
154620583 toomer C April 23, 2022, 5:50 a.m. OK Rust 2021 TESTS 15 30 4812800
154593626 0x7e0n1d C April 22, 2022, 7:54 p.m. OK Rust 2021 TESTS 15 31 7168000

remove filters

Back to search problems