Codeforces Round 757 (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
1614 Codeforces Round 757 (Div. 2) FINISHED False 7200 93897899 Nov. 26, 2021, 11:15 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 23509 ) A Divan and a Store PROGRAMMING brute force constructive algorithms greedy 800

B"Businessman Divan loves chocolate! Today he came to a store to buy some chocolate. Like all businessmen, Divan knows the value of money, so he will not buy too expensive chocolate. At the same time, too cheap chocolate tastes bad, so he will not buy it as well. The store he came to has n different chocolate bars, and the price of the i -th chocolate bar is a_i dollars. Divan considers a chocolate bar too expensive if it costs strictly more than r dollars. Similarly, he considers a bar of chocolate to be too cheap if it costs strictly less than l dollars. Divan will not buy too cheap or too expensive bars. Divan is not going to spend all his money on chocolate bars, so he will spend at most k dollars on chocolates. Please determine the maximum number of chocolate bars Divan can buy. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 100 ). Description of the test cases follows. The description of each test case consists of two lines. The first line contains integers n , l , r , k ( 1 <= n <= 100 , 1 <= l <= r <= 10^9 , 1 <= k <= 10^9 ) -- the lowest acceptable price of a chocolate, the highest acceptable price of a chocolate and Divan's total budget, respectively. The second line contains a sequence a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^9 ) integers -- the prices of chocolate bars in the store. For each test case print a single integer -- the maximum number of chocolate bars Divan can buy. In the first example Divan can buy chocolate bars 1 and 3 and spend 100 dollars on them. In the second example Divan can buy chocolate bars 3 and 4 and spend 7 dollars on them. In the third example Divan can buy chocolate bars 3 , 4 , and 5 for 12 dollars. In the fourth example Divan cannot buy any chocolate bar because each of them is either too cheap or too"...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
137072528 gxlois A Nov. 26, 2021, 9:39 p.m. OK D TESTS 7 15 0 800
137070384 Fell-iwni A Nov. 26, 2021, 8:36 p.m. OK GNU C11 TESTS 7 15 0 800
137031234 Ashley1221 A Nov. 26, 2021, 12:54 p.m. OK GNU C11 TESTS 7 15 0 800
137051110 HaPpY1213 A Nov. 26, 2021, 3:22 p.m. OK GNU C11 TESTS 7 15 0 800
137059988 harsh52sharma A Nov. 26, 2021, 5:24 p.m. OK GNU C11 TESTS 7 15 0 800
137029764 rohithchandrasaichowdary A Nov. 26, 2021, 12:50 p.m. OK GNU C11 TESTS 7 15 0 800
137036961 20101111 A Nov. 26, 2021, 1:11 p.m. OK GNU C11 TESTS 7 15 1638400 800
137054972 nizniz420 A Nov. 26, 2021, 4:14 p.m. OK GNU C11 TESTS 7 30 0 800
137055597 Shazzed_Hossain_Shajal A Nov. 26, 2021, 4:22 p.m. OK GNU C11 TESTS 7 30 0 800
137077892 GaryH A Nov. 27, 2021, 1:46 a.m. OK GNU C++14 TESTS 7 0 0 800
137078133 PRCking A Nov. 27, 2021, 1:54 a.m. OK GNU C++14 TESTS 7 0 0 800
137077734 liumonong A Nov. 27, 2021, 1:42 a.m. OK GNU C++14 TESTS 7 0 0 800
137076488 abs001 A Nov. 27, 2021, 12:55 a.m. OK GNU C++14 TESTS 7 0 0 800
137075980 likejia A Nov. 27, 2021, 12:32 a.m. OK GNU C++14 TESTS 7 0 0 800
137073395 LONG__INT A Nov. 26, 2021, 10:12 p.m. OK GNU C++14 TESTS 7 0 0 800
137089877 No-Rain A Nov. 27, 2021, 5:37 a.m. OK GNU C++14 TESTS 7 0 0 800
137088403 KunalSin9h A Nov. 27, 2021, 5:18 a.m. OK GNU C++14 TESTS 7 0 0 800
137081192 2_3_3 A Nov. 27, 2021, 3:09 a.m. OK GNU C++14 TESTS 7 0 0 800
137078816 to3z A Nov. 27, 2021, 2:13 a.m. OK GNU C++14 TESTS 7 0 0 800
137084184 ichigo_kurosaki_ A Nov. 27, 2021, 4:13 a.m. OK GNU C++17 TESTS 7 0 0 800
137080406 cslgz09419122 A Nov. 27, 2021, 2:52 a.m. OK GNU C++17 TESTS 7 0 0 800
137080259 Etherealz A Nov. 27, 2021, 2:48 a.m. OK GNU C++17 TESTS 7 0 0 800
137078490 Z__Z A Nov. 27, 2021, 2:04 a.m. OK GNU C++17 TESTS 7 0 0 800
137077748 Ankar_kumar_saha A Nov. 27, 2021, 1:42 a.m. OK GNU C++17 TESTS 7 0 0 800
137075970 _martinus A Nov. 27, 2021, 12:31 a.m. OK GNU C++17 TESTS 7 0 0 800
137072365 pgimalac A Nov. 26, 2021, 9:34 p.m. OK GNU C++17 TESTS 7 0 0 800
137068793 thepeacefulwarrior A Nov. 26, 2021, 7:57 p.m. OK GNU C++17 TESTS 7 0 0 800
137068017 murat.cepeda.. A Nov. 26, 2021, 7:40 p.m. OK GNU C++17 TESTS 7 0 0 800
137058517 remedy A Nov. 26, 2021, 5:04 p.m. OK GNU C++17 TESTS 7 0 0 800
137071216 Vadmanbat A Nov. 26, 2021, 8:58 p.m. OK GNU C++17 (64) TESTS 7 0 0 800
137061067 vaibhav.krsingh.min20 A Nov. 26, 2021, 5:39 p.m. OK GNU C++17 (64) TESTS 7 0 0 800
137058881 vikram_pratap_singh A Nov. 26, 2021, 5:09 p.m. OK GNU C++17 (64) TESTS 7 0 0 800
137073829 ale_naser_pastoriza A Nov. 26, 2021, 10:32 p.m. OK GNU C++17 (64) TESTS 7 0 0 800
137074049 xlz A Nov. 26, 2021, 10:43 p.m. OK GNU C++17 (64) TESTS 7 0 0 800
137075851 prottoyfuad A Nov. 27, 2021, 12:26 a.m. OK GNU C++17 (64) TESTS 7 0 0 800
137075872 QwQcOrZ A Nov. 27, 2021, 12:27 a.m. OK GNU C++17 (64) TESTS 7 0 0 800
137080844 Akib_12 A Nov. 27, 2021, 3:01 a.m. OK GNU C++17 (64) TESTS 7 0 0 800
137081020 akifpatel A Nov. 27, 2021, 3:05 a.m. OK GNU C++17 (64) TESTS 7 0 0 800
137087518 CODERGARV A Nov. 27, 2021, 5:07 a.m. OK GNU C++17 (64) TESTS 7 0 0 800
137067914 Bench0310 A Nov. 26, 2021, 7:38 p.m. OK GNU C++20 (64) TESTS 7 0 0 800
137066809 Serik2003 A Nov. 26, 2021, 7:14 p.m. OK GNU C++20 (64) TESTS 7 0 0 800
137063716 Rajveer_100 A Nov. 26, 2021, 6:19 p.m. OK GNU C++20 (64) TESTS 7 0 0 800
137083018 fundamentals A Nov. 27, 2021, 3:47 a.m. OK GNU C++20 (64) TESTS 7 0 0 800
137080290 BilibiliTDASC A Nov. 27, 2021, 2:49 a.m. OK GNU C++20 (64) TESTS 7 0 0 800
137077145 emn2 A Nov. 27, 2021, 1:21 a.m. OK GNU C++20 (64) TESTS 7 0 0 800
137071308 Vadmanbat A Nov. 26, 2021, 9:01 p.m. OK GNU C++20 (64) TESTS 7 0 0 800
137070200 Grapeee A Nov. 26, 2021, 8:31 p.m. OK GNU C++20 (64) TESTS 7 0 0 800
137068481 MohamedMagdy A Nov. 26, 2021, 7:50 p.m. OK GNU C++20 (64) TESTS 7 0 0 800
137087961 nathan_luiz A Nov. 27, 2021, 5:13 a.m. OK GNU C++20 (64) TESTS 7 0 0 800
137077985 graceoflives A Nov. 27, 2021, 1:49 a.m. OK Go TESTS 7 15 204800 800
137068207 codelegend A Nov. 26, 2021, 7:44 p.m. OK Haskell TESTS 7 30 0 800
137060779 TomazGomes A Nov. 26, 2021, 5:35 p.m. OK Haskell TESTS 7 46 0 800
137076027 ethan55 A Nov. 27, 2021, 12:34 a.m. OK Java 11 TESTS 7 155 0 800
137090297 solo07 A Nov. 27, 2021, 5:42 a.m. OK Java 11 TESTS 7 155 0 800
137070235 mareshkau A Nov. 26, 2021, 8:32 p.m. OK Java 11 TESTS 7 156 0 800
137074575 codebook_2000 A Nov. 26, 2021, 11:12 p.m. OK Java 11 TESTS 7 171 0 800
137088888 Toinfinity A Nov. 27, 2021, 5:24 a.m. OK Java 11 TESTS 7 171 0 800
137088123 SavageClown007 A Nov. 27, 2021, 5:15 a.m. OK Java 11 TESTS 7 171 0 800
137084775 Akash_Singh_Panwar A Nov. 27, 2021, 4:24 a.m. OK Java 11 TESTS 7 171 0 800
137081076 edwardw A Nov. 27, 2021, 3:06 a.m. OK Java 11 TESTS 7 171 0 800
137066482 rajneesh.osho A Nov. 26, 2021, 7:08 p.m. OK Java 11 TESTS 7 171 0 800
137066342 Nick A Nov. 26, 2021, 7:05 p.m. OK Java 11 TESTS 7 171 0 800
137062184 sedenion A Nov. 26, 2021, 5:55 p.m. OK Java 8 TESTS 7 77 0 800
137072997 snowyrsb A Nov. 26, 2021, 9:55 p.m. OK Java 8 TESTS 7 93 0 800
137065997 gagan_6730 A Nov. 26, 2021, 6:59 p.m. OK Java 8 TESTS 7 93 0 800
137049794 lcheeme1 A Nov. 26, 2021, 3:07 p.m. OK Java 8 TESTS 7 93 0 800
137055752 smahajan54842 A Nov. 26, 2021, 4:24 p.m. OK Java 8 TESTS 7 108 0 800
137060867 akshaygupta26 A Nov. 26, 2021, 5:36 p.m. OK Java 8 TESTS 7 108 0 800
137080632 rakshith572 A Nov. 27, 2021, 2:57 a.m. OK Java 8 TESTS 7 108 0 800
137072752 Maikyh04 A Nov. 26, 2021, 9:47 p.m. OK Java 8 TESTS 7 108 0 800
137065473 tishrah_ A Nov. 26, 2021, 6:50 p.m. OK Java 8 TESTS 7 108 0 800
137054489 Embrion_top A Nov. 26, 2021, 4:07 p.m. OK Java 8 TESTS 7 109 0 800
137050614 Kofirs2634 A Nov. 26, 2021, 3:16 p.m. OK Kotlin 1.5 TESTS 7 202 1126400 800
137069034 dino_merlin A Nov. 26, 2021, 8:01 p.m. OK MS C++ 2017 TESTS 7 15 0 800
137074623 Saif_Dawood A Nov. 26, 2021, 11:15 p.m. OK MS C++ 2017 TESTS 7 15 0 800
137055975 Bakamboker A Nov. 26, 2021, 4:27 p.m. OK MS C++ 2017 TESTS 7 15 0 800
137050402 Karan.K A Nov. 26, 2021, 3:14 p.m. OK MS C++ 2017 TESTS 7 15 0 800
137050193 komalsatwik2002 A Nov. 26, 2021, 3:11 p.m. OK MS C++ 2017 TESTS 7 15 0 800
137049022 13coder A Nov. 26, 2021, 2:59 p.m. OK MS C++ 2017 TESTS 7 15 0 800
137031523 whswhswhs A Nov. 26, 2021, 12:55 p.m. OK MS C++ 2017 TESTS 7 15 0 800
137031412 xfyyye A Nov. 26, 2021, 12:55 p.m. OK MS C++ 2017 TESTS 7 15 0 800
137055736 Tagaki A Nov. 26, 2021, 4:23 p.m. OK MS C++ 2017 TESTS 7 15 1638400 800
137083818 xilyfeaaaa A Nov. 27, 2021, 4:06 a.m. OK MS C++ 2017 TESTS 7 15 7987200 800
137052194 Ahad726 A Nov. 26, 2021, 3:36 p.m. OK .NET Core C# TESTS 7 77 1024000 800
137031330 ivan.shramko A Nov. 26, 2021, 12:55 p.m. OK Node.js TESTS 7 62 0 800
137075033 s3vin A Nov. 26, 2021, 11:38 p.m. OK Perl TESTS 7 31 0 800
137074455 TribalGolem A Nov. 26, 2021, 11:04 p.m. OK PyPy 2 TESTS 7 62 409600 800
137047489 KanishkGoel A Nov. 26, 2021, 2:43 p.m. OK PyPy 3 TESTS 7 78 1945600 800
137061895 BlackPearl_ A Nov. 26, 2021, 5:50 p.m. OK PyPy 3 TESTS 7 92 1740800 800
137052259 k_star_ A Nov. 26, 2021, 3:37 p.m. OK PyPy 3 TESTS 7 93 1638400 800
137059848 vchpro A Nov. 26, 2021, 5:22 p.m. OK PyPy 3 TESTS 7 93 1638400 800
137058876 InvalidSyntax A Nov. 26, 2021, 5:09 p.m. OK PyPy 3 TESTS 7 93 1638400 800
137043989 Huntersoulz A Nov. 26, 2021, 2:08 p.m. OK PyPy 3 TESTS 7 93 1638400 800
137075567 riosshin24 A Nov. 27, 2021, 12:11 a.m. OK PyPy 3 TESTS 7 108 1638400 800
137067746 Lyamzin_alexandr A Nov. 26, 2021, 7:34 p.m. OK PyPy 3 TESTS 7 108 1740800 800
137063378 1293789127 A Nov. 26, 2021, 6:14 p.m. OK PyPy 3 TESTS 7 108 1740800 800
137058247 whatshisbucket A Nov. 26, 2021, 5 p.m. OK PyPy 3 TESTS 7 108 1740800 800
137077270 kenntnisse A Nov. 27, 2021, 1:25 a.m. OK PyPy 3-64 TESTS 7 77 2662400 800
137064672 tyzzi A Nov. 26, 2021, 6:36 p.m. OK PyPy 3-64 TESTS 7 77 2662400 800
137065691 kl.nei A Nov. 26, 2021, 6:54 p.m. OK PyPy 3-64 TESTS 7 77 2764800 800
137057439 Frolov A Nov. 26, 2021, 4:48 p.m. OK PyPy 3-64 TESTS 7 77 2764800 800
137078610 rutz12 A Nov. 27, 2021, 2:08 a.m. OK PyPy 3-64 TESTS 7 77 2867200 800
137061020 pranay_28 A Nov. 26, 2021, 5:38 p.m. OK PyPy 3-64 TESTS 7 77 2969600 800
137064687 freakbuoyancy A Nov. 26, 2021, 6:37 p.m. OK PyPy 3-64 TESTS 7 77 3072000 800
137053605 Melmetal A Nov. 26, 2021, 3:56 p.m. OK PyPy 3-64 TESTS 7 77 3379200 800
137046300 UdhayaShan A Nov. 26, 2021, 2:31 p.m. OK PyPy 3-64 TESTS 7 77 3686400 800
137074103 Chobshaw A Nov. 26, 2021, 10:46 p.m. OK PyPy 3-64 TESTS 7 78 2662400 800
137033803 sukriti A Nov. 26, 2021, 1:02 p.m. OK Python 2 TESTS 7 62 204800 800
137074659 sas_grisha A Nov. 26, 2021, 11:17 p.m. OK Python 3 TESTS 7 31 0 800
137074242 UltraXDZN A Nov. 26, 2021, 10:52 p.m. OK Python 3 TESTS 7 31 0 800
137067448 Sam._.072 A Nov. 26, 2021, 7:27 p.m. OK Python 3 TESTS 7 31 0 800
137055016 Alterf A Nov. 26, 2021, 4:14 p.m. OK Python 3 TESTS 7 31 0 800
137049017 sherwyn11 A Nov. 26, 2021, 2:59 p.m. OK Python 3 TESTS 7 31 0 800
137030265 CodeWithDeath A Nov. 26, 2021, 12:52 p.m. OK Python 3 TESTS 7 31 0 800
137091700 SeON A Nov. 27, 2021, 5:59 a.m. OK Python 3 TESTS 7 46 0 800
137089416 Yagnesh_S_Shetty A Nov. 27, 2021, 5:31 a.m. OK Python 3 TESTS 7 46 0 800
137083455 Tanish08 A Nov. 27, 2021, 3:58 a.m. OK Python 3 TESTS 7 46 0 800
137078304 Sh4K4L04 A Nov. 27, 2021, 1:59 a.m. OK Python 3 TESTS 7 46 0 800
137045328 Spheniscine A Nov. 26, 2021, 2:22 p.m. OK Rust TESTS 7 15 102400 800
137046431 ledinhbao A Nov. 26, 2021, 2:32 p.m. OK Rust TESTS 7 15 102400 800

remove filters

Back to search problems