Codeforces Round 835 (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
1760 Codeforces Round 835 (Div. 4) FINISHED False 8700 68138663 Nov. 21, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 12741 ) F Quests PROGRAMMING binary search greedy sortings

B"There are n quests. If you complete the i -th quest, you will gain a_i coins. You can only complete at most one quest per day. However, once you complete a quest, you cannot do the same quest again for k days. (For example, if k=2 and you do quest 1 on day 1 , then you cannot do it on day 2 or 3 , but you can do it again on day 4 .) You are given two integers c and d . Find the maximum value of k such that you can gain at least c coins over d days. If no such k exists, output Impossible. If k can be arbitrarily large, output Infinity. The input consists of multiple test cases. The first line contains an integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains three integers n,c,d ( 2 <= q n <= q 2 cdot10^5 ; 1 <= q c <= q 10^{16} ; 1 <= q d <= q 2 cdot10^5 ) -- the number of quests, the number of coins you need, and the number of days. The second line of each test case contains n integers a_1, a_2, ... , a_n ( 1 <= q a_i <= q 10^9 ) -- the rewards for the quests. The sum of n over all test cases does not exceed 2 cdot10^5 , and the sum of d over all test cases does not exceed 2 cdot10^5 . For each test case, output one of the following. In the first test case, one way to earn 5 coins over 4 days with k=2 is as follows: In the second test case, we can make over 20 coins on the first day itself by doing the first quest to earn 100 coins, so the value of k can be arbitrarily large, since we never need to do another quest. In the third test case, no matter what we do, we can't earn 100 coins over 3 days. "...

Tutorials

109348

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
182079138 chrisfcoder F Nov. 22, 2022, 3:01 a.m. OK C# 10 TESTS 7 93 16691200
182052083 WAAAAAAAAAAAAAAAAAAAAA F Nov. 21, 2022, 7:19 p.m. OK C# 10 TESTS 7 124 17715200
182042140 tahtarovserver F Nov. 21, 2022, 5:43 p.m. OK C# 8 TESTS 7 171 19660800
182044188 WATL F Nov. 21, 2022, 6 p.m. OK Clang++17 Diagnostics TESTS 7 280 716800
182043875 WATL F Nov. 21, 2022, 5:57 p.m. OK Clang++17 Diagnostics TESTS 7 311 716800
182043633 WATL F Nov. 21, 2022, 5:55 p.m. OK Clang++17 Diagnostics TESTS 7 1154 1638400
182075499 ac2hu F Nov. 22, 2022, 1:48 a.m. OK GNU C11 TESTS 7 78 1638400
182081038 akcube F Nov. 22, 2022, 3:29 a.m. OK GNU C11 TESTS 7 93 1638400
182081011 akcube F Nov. 22, 2022, 3:28 a.m. OK GNU C11 TESTS 7 109 1638400
182076671 liympanda F Nov. 22, 2022, 2:13 a.m. OK GNU C++14 TESTS 7 62 2560000
182065562 mugiwara_2980 F Nov. 21, 2022, 11:36 p.m. OK GNU C++14 TESTS 7 62 3174400
182059704 tesst999 F Nov. 21, 2022, 9:12 p.m. OK GNU C++14 TESTS 7 77 819200
182086595 Gowilli F Nov. 22, 2022, 5:09 a.m. OK GNU C++14 TESTS 7 77 1638400
182085570 Guichena F Nov. 22, 2022, 4:52 a.m. OK GNU C++14 TESTS 7 77 1638400
182080484 Akash_Ahmed F Nov. 22, 2022, 3:19 a.m. OK GNU C++14 TESTS 7 77 1638400
182055105 Heisenburg-120 F Nov. 21, 2022, 7:57 p.m. OK GNU C++14 TESTS 7 77 3174400
182056304 innocentcodr23 F Nov. 21, 2022, 8:14 p.m. OK GNU C++14 TESTS 7 77 3174400
182055399 icmourya F Nov. 21, 2022, 8:01 p.m. OK GNU C++14 TESTS 7 77 3174400
182042934 flavius_nebunu F Nov. 21, 2022, 5:49 p.m. OK GNU C++14 TESTS 7 77 4812800
182069056 ff_666 F Nov. 22, 2022, 1:15 a.m. OK GNU C++17 TESTS 7 31 1843200
182068294 Ashish_Mohanka F Nov. 22, 2022, 12:58 a.m. OK GNU C++17 TESTS 7 62 3174400
182042367 egor.fokin F Nov. 21, 2022, 5:44 p.m. OK GNU C++17 TESTS 7 62 3174400
182068246 Huoi F Nov. 22, 2022, 12:56 a.m. OK GNU C++17 TESTS 7 77 819200
182050125 Rajat.18 F Nov. 21, 2022, 6:57 p.m. OK GNU C++17 TESTS 7 77 819200
182042136 the__phoenix F Nov. 21, 2022, 5:43 p.m. OK GNU C++17 TESTS 7 77 1638400
182077036 aaditya_mathur F Nov. 22, 2022, 2:20 a.m. OK GNU C++17 TESTS 7 77 1638400
182042536 CrazyCoder00 F Nov. 21, 2022, 5:46 p.m. OK GNU C++17 TESTS 7 77 2457600
182086635 panyan7 F Nov. 22, 2022, 5:09 a.m. OK GNU C++17 TESTS 7 77 3174400
182084649 ayushraghuwanshi22 F Nov. 22, 2022, 4:35 a.m. OK GNU C++17 TESTS 7 77 3174400
182082393 Calanosay F Nov. 22, 2022, 3:53 a.m. OK GNU C++17 (64) TESTS 7 46 1638400
182087916 KunalSin9h F Nov. 22, 2022, 5:29 a.m. OK GNU C++17 (64) TESTS 7 46 1638400
182075771 BuptNorthRemembers F Nov. 22, 2022, 1:54 a.m. OK GNU C++17 (64) TESTS 7 46 1638400
182072916 Justinianus2001 F Nov. 22, 2022, 1:33 a.m. OK GNU C++17 (64) TESTS 7 46 1638400
182050425 kevinyang uwu F Nov. 21, 2022, 7:01 p.m. OK GNU C++17 (64) TESTS 7 46 3174400
182057859 enslaved F Nov. 21, 2022, 8:39 p.m. OK GNU C++17 (64) TESTS 7 46 3174400
182076146 Lycoriss F Nov. 22, 2022, 2:02 a.m. OK GNU C++17 (64) TESTS 7 46 3174400
182049650 Edu175 F Nov. 21, 2022, 6:52 p.m. OK GNU C++17 (64) TESTS 7 46 3174400
182044725 jysu2023 F Nov. 21, 2022, 6:04 p.m. OK GNU C++17 (64) TESTS 7 46 3174400
182053083 Vedant_05 F Nov. 21, 2022, 7:31 p.m. OK GNU C++17 (64) TESTS 7 46 3174400
182062579 lo0ofy F Nov. 21, 2022, 10:13 p.m. OK GNU C++20 (64) TESTS 7 31 1638400
182062617 AliRagab313 F Nov. 21, 2022, 10:13 p.m. OK GNU C++20 (64) TESTS 7 31 1638400
182068741 WangZhizhi F Nov. 22, 2022, 1:08 a.m. OK GNU C++20 (64) TESTS 7 31 2457600
182058666 Usef. F Nov. 21, 2022, 8:53 p.m. OK GNU C++20 (64) TESTS 7 31 3174400
182064382 nvllable F Nov. 21, 2022, 11:01 p.m. OK GNU C++20 (64) TESTS 7 46 819200
182088072 HuParry F Nov. 22, 2022, 5:32 a.m. OK GNU C++20 (64) TESTS 7 46 819200
182066658 AmmarAF F Nov. 22, 2022, 12:12 a.m. OK GNU C++20 (64) TESTS 7 46 819200
182064695 envision_799 F Nov. 21, 2022, 11:09 p.m. OK GNU C++20 (64) TESTS 7 46 819200
182050162 Alyalsayed F Nov. 21, 2022, 6:58 p.m. OK GNU C++20 (64) TESTS 7 46 819200
182039206 ishwarendra F Nov. 21, 2022, 5:23 p.m. OK GNU C++20 (64) TESTS 7 46 819200
182037475 ming1ing F Nov. 21, 2022, 5:14 p.m. OK Go TESTS 7 124 4915200
182037845 ming1ing F Nov. 21, 2022, 5:15 p.m. OK Go TESTS 7 140 5017600
182062860 shiro F Nov. 21, 2022, 10:19 p.m. OK Go TESTS 7 140 5120000
182068642 EDCTY F Nov. 22, 2022, 1:05 a.m. OK Java 11 TESTS 7 218 0
182068265 EDCTY F Nov. 22, 2022, 12:57 a.m. OK Java 11 TESTS 7 234 0
182083680 x21svage F Nov. 22, 2022, 4:17 a.m. OK Java 11 TESTS 7 296 0
182058866 Alex_by F Nov. 21, 2022, 8:56 p.m. OK Java 11 TESTS 7 311 409600
182037554 IanISam F Nov. 21, 2022, 5:14 p.m. OK Java 11 TESTS 7 358 0
182063954 saragarz F Nov. 21, 2022, 10:49 p.m. OK Java 11 TESTS 7 530 0
182046079 kritikmodi F Nov. 21, 2022, 6:16 p.m. OK Java 11 TESTS 7 561 4198400
182035163 HeXecutor F Nov. 21, 2022, 5:03 p.m. OK Java 11 TESTS 7 592 0
182066800 kevy15 F Nov. 22, 2022, 12:17 a.m. OK Java 17 TESTS 7 248 921600
182066869 kevy15 F Nov. 22, 2022, 12:19 a.m. OK Java 17 TESTS 7 249 716800
182043222 andrey777 F Nov. 21, 2022, 5:52 p.m. OK Java 17 TESTS 7 296 1740800
182058217 -Jarvis- F Nov. 21, 2022, 8:45 p.m. OK Java 17 TESTS 7 311 819200
182065349 kevy15 F Nov. 21, 2022, 11:28 p.m. OK Java 17 TESTS 7 312 1024000
182040043 Eslam_Ahmed F Nov. 21, 2022, 5:27 p.m. OK Java 17 TESTS 7 358 307200
182036012 xplorer F Nov. 21, 2022, 5:06 p.m. OK Java 17 TESTS 7 358 7782400
182043261 cooler_killer F Nov. 21, 2022, 5:52 p.m. OK Java 17 TESTS 7 358 19865600
182046176 backdemon F Nov. 21, 2022, 6:17 p.m. OK Java 17 TESTS 7 545 921600
182067134 Rayhan_07 F Nov. 22, 2022, 12:27 a.m. OK Java 8 TESTS 7 186 0
182083958 ikillmyself F Nov. 22, 2022, 4:23 a.m. OK Java 8 TESTS 7 217 0
182056868 Mohamed308 F Nov. 21, 2022, 8:23 p.m. OK Java 8 TESTS 7 233 4403200
182052708 Mohamed_A7med F Nov. 21, 2022, 7:26 p.m. OK Java 8 TESTS 7 265 4505600
182047479 Kaldaruly F Nov. 21, 2022, 6:30 p.m. OK Java 8 TESTS 7 312 76902400
182084842 YingChenLiu F Nov. 22, 2022, 4:39 a.m. OK Java 8 TESTS 7 468 0
182075376 1556444097 F Nov. 22, 2022, 1:45 a.m. OK Java 8 TESTS 7 514 0
182087778 3.1415926535... F Nov. 22, 2022, 5:27 a.m. OK Java 8 TESTS 7 2604 39321600
182047027 timusmanovs F Nov. 21, 2022, 6:25 p.m. OK MS C++ 2017 TESTS 7 218 3174400
182047204 1001101dfs F Nov. 21, 2022, 6:27 p.m. OK MS C++ 2017 TESTS 7 249 3174400
182077071 ankit_xyz F Nov. 22, 2022, 2:21 a.m. OK PyPy 2 TESTS 7 327 18432000
182077110 ankit_xyz F Nov. 22, 2022, 2:22 a.m. OK PyPy 2 TESTS 7 421 18739200
182049924 Greyhound F Nov. 21, 2022, 6:55 p.m. OK PyPy 3 TESTS 7 389 20480000
182043923 BekiTila F Nov. 21, 2022, 5:58 p.m. OK PyPy 3 TESTS 7 607 19148800
182058949 ayshiff F Nov. 21, 2022, 8:58 p.m. OK PyPy 3 TESTS 7 608 19046400
182047876 aadarsh_ram F Nov. 21, 2022, 6:34 p.m. OK PyPy 3 TESTS 7 763 21811200
182041801 phantomxxx F Nov. 21, 2022, 5:40 p.m. OK PyPy 3 TESTS 7 1122 21299200
182045992 mrdhnv F Nov. 21, 2022, 6:15 p.m. OK PyPy 3-64 TESTS 7 140 25907200
182077664 ankit_xyz F Nov. 22, 2022, 2:33 a.m. OK PyPy 3-64 TESTS 7 140 29900800
182077046 ankit_xyz F Nov. 22, 2022, 2:21 a.m. OK PyPy 3-64 TESTS 7 155 29900800
182068777 beethoven97 F Nov. 22, 2022, 1:08 a.m. OK PyPy 3-64 TESTS 7 171 22732800
182043048 dhruv1807 F Nov. 21, 2022, 5:50 p.m. OK PyPy 3-64 TESTS 7 171 29900800
182036992 ueta F Nov. 21, 2022, 5:11 p.m. OK PyPy 3-64 TESTS 7 186 29900800
182047874 mrdhnv F Nov. 21, 2022, 6:34 p.m. OK PyPy 3-64 TESTS 7 202 21094400
182068618 beethoven97 F Nov. 22, 2022, 1:05 a.m. OK PyPy 3-64 TESTS 7 202 22732800
182082731 Nan-Do F Nov. 22, 2022, 4 a.m. OK PyPy 3-64 TESTS 7 202 28876800
182047011 Talurist F Nov. 21, 2022, 6:25 p.m. OK PyPy 3-64 TESTS 7 202 29388800
182076807 ankit_xyz F Nov. 22, 2022, 2:16 a.m. OK Python 3 TESTS 7 265 15769600
182042267 NS3081992 F Nov. 21, 2022, 5:44 p.m. OK Python 3 TESTS 7 280 15564800
182077018 ankit_xyz F Nov. 22, 2022, 2:20 a.m. OK Python 3 TESTS 7 280 15872000
182083896 zaphar F Nov. 22, 2022, 4:21 a.m. OK Python 3 TESTS 7 311 15769600
182077188 ankit_xyz F Nov. 22, 2022, 2:23 a.m. OK Python 3 TESTS 7 311 15769600
182053498 zamaninikan F Nov. 21, 2022, 7:36 p.m. OK Python 3 TESTS 7 358 15667200
182076734 yeling F Nov. 22, 2022, 2:14 a.m. OK Python 3 TESTS 7 545 16076800
182035322 peidi F Nov. 21, 2022, 5:04 p.m. OK Python 3 TESTS 7 592 15667200
182083956 dmnewone F Nov. 22, 2022, 4:23 a.m. OK Python 3 TESTS 7 607 15769600
182054918 Alouchte F Nov. 21, 2022, 7:54 p.m. OK Python 3 TESTS 7 1638 15667200
182047766 wmrmr F Nov. 21, 2022, 6:33 p.m. OK Rust 2021 TESTS 7 46 5836800
182050269 nikgaevoy F Nov. 21, 2022, 6:59 p.m. OK Rust 2021 TESTS 7 92 18227200

remove filters

Back to search problems