Codeforces Round 697 (Div. 3)

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
1475 Codeforces Round 697 (Div. 3) FINISHED False 7200 125593163 Jan. 25, 2021, 3 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10348 ) D Cleaning the Phone PROGRAMMING binary search dp greedy sortings two pointers

B"Polycarp often uses his smartphone. He has already installed n applications on it. Application with number i takes up a_i units of memory. Polycarp wants to free at least m units of memory (by removing some applications). Of course, some applications are more important to Polycarp than others. He came up with the following scoring system -- he assigned an integer b_i to each application: According to this rating system, his phone has b_1 + b_2 + ldots + b_n convenience points. Polycarp believes that if he removes applications with numbers i_1, i_2, ldots, i_k , then he will free a_{i_1} + a_{i_2} + ldots + a_{i_k} units of memory and lose b_{i_1} + b_{i_2} + ldots + b_{i_k} convenience points. For example, if n=5 , m=7 , a=[5, 3, 2, 1, 4] , b=[2, 1, 1, 2, 1] , then Polycarp can uninstall the following application sets (not all options are listed below): Help Polycarp, choose a set of applications, such that if removing them will free at least m units of memory and lose the minimum number of convenience points, or indicate that such a set does not exist. The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Then t test cases follow. The first line of each test case contains two integers n and m ( 1 <= n <= 2 cdot 10^5 , 1 <= m <= 10^9 ) -- the number of applications on Polycarp's phone and the number of memory units to be freed. The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^9 ) -- the number of memory units used by applications. The third line of each test case contains n integers b_1, b_2, ldots, b_n ( 1 <= b_i <= 2 ) -- the convenience points of each application. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output on a separate line: "...

Tutorials

Codeforces Round #697 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
105425390 e_e_thinker D Jan. 25, 2021, 11:20 p.m. OK GNU C++11 TESTS 5 31 2355200
105436206 fallleaves01 D Jan. 26, 2021, 4:07 a.m. OK GNU C++11 TESTS 5 31 3174400
105433343 LengYun D Jan. 26, 2021, 3:10 a.m. OK GNU C++11 TESTS 5 31 4812800
105430168 ce_amtic D Jan. 26, 2021, 1:59 a.m. OK GNU C++11 TESTS 5 31 4812800
105430151 _CA D Jan. 26, 2021, 1:58 a.m. OK GNU C++11 TESTS 5 31 4812800
105439597 _zwx_syx_ D Jan. 26, 2021, 5:05 a.m. OK GNU C++11 TESTS 5 31 7987200
105441372 pp__qq D Jan. 26, 2021, 5:29 a.m. OK GNU C++11 TESTS 5 31 9523200
105431097 lanChe D Jan. 26, 2021, 2:23 a.m. OK GNU C++11 TESTS 5 31 18636800
105431204 xfzlq D Jan. 26, 2021, 2:26 a.m. OK GNU C++11 TESTS 5 46 3174400
105435213 qdnoip D Jan. 26, 2021, 3:47 a.m. OK GNU C++11 TESTS 5 46 5529600
105427414 tjd229 D Jan. 26, 2021, 12:35 a.m. OK GNU C++14 TESTS 5 62 3174400
105429625 Basem.Maher D Jan. 26, 2021, 1:43 a.m. OK GNU C++14 TESTS 5 77 2662400
105432027 prateek3110 D Jan. 26, 2021, 2:44 a.m. OK GNU C++14 TESTS 5 78 2457600
105418595 batman_memory D Jan. 25, 2021, 8:22 p.m. OK GNU C++14 TESTS 5 78 4812800
105438020 thaizhenleng D Jan. 26, 2021, 4:40 a.m. OK GNU C++14 TESTS 5 92 4812800
105442454 aditya_01 D Jan. 26, 2021, 5:42 a.m. OK GNU C++14 TESTS 5 92 5120000
105415249 divyanshuGupta D Jan. 25, 2021, 7:24 p.m. OK GNU C++14 TESTS 5 93 2355200
105431795 sebastianbranzapata D Jan. 26, 2021, 2:39 a.m. OK GNU C++14 TESTS 5 93 2457600
105419293 NaimSS D Jan. 25, 2021, 8:36 p.m. OK GNU C++14 TESTS 5 93 2457600
105412734 aditi2899 D Jan. 25, 2021, 6:49 p.m. OK GNU C++14 TESTS 5 93 2457600
105407375 Yuchi D Jan. 25, 2021, 5:52 p.m. OK GNU C++17 TESTS 5 31 5836800
105402318 samill D Jan. 25, 2021, 5:15 p.m. OK GNU C++17 TESTS 5 77 3174400
105405887 fillleon D Jan. 25, 2021, 5:39 p.m. OK GNU C++17 TESTS 5 77 3686400
105413059 BHwujiashuai1234 D Jan. 25, 2021, 6:54 p.m. OK GNU C++17 TESTS 5 77 4812800
105403849 obaydullahmhs D Jan. 25, 2021, 5:25 p.m. OK GNU C++17 TESTS 5 77 4812800
105403555 KiruxaLight D Jan. 25, 2021, 5:23 p.m. OK GNU C++17 TESTS 5 77 6553600
105413323 dontknowme D Jan. 25, 2021, 6:57 p.m. OK GNU C++17 TESTS 5 78 2457600
105410224 harshsri2807 D Jan. 25, 2021, 6:20 p.m. OK GNU C++17 TESTS 5 78 2457600
105434856 elvisbird D Jan. 26, 2021, 3:40 a.m. OK GNU C++17 TESTS 5 78 3174400
105405991 HeeJaYaa D Jan. 25, 2021, 5:40 p.m. OK GNU C++17 TESTS 5 78 3174400
105443469 CodingKnight D Jan. 26, 2021, 5:54 a.m. OK GNU C++17 (64) TESTS 5 31 3584000
105443290 CodingKnight D Jan. 26, 2021, 5:51 a.m. OK GNU C++17 (64) TESTS 5 31 3584000
105443878 CodingKnight D Jan. 26, 2021, 5:59 a.m. OK GNU C++17 (64) TESTS 5 46 3584000
105442635 CodingKnight D Jan. 26, 2021, 5:44 a.m. OK GNU C++17 (64) TESTS 5 46 3584000
105403084 rgnerdplayer D Jan. 25, 2021, 5:20 p.m. OK GNU C++17 (64) TESTS 5 46 3788800
105413297 Thallium54 D Jan. 25, 2021, 6:57 p.m. OK GNU C++17 (64) TESTS 5 46 5017600
105435509 Continued_Story D Jan. 26, 2021, 3:53 a.m. OK GNU C++17 (64) TESTS 5 46 5836800
105418859 clam D Jan. 25, 2021, 8:27 p.m. OK GNU C++17 (64) TESTS 5 46 9625600
105429736 Paniago D Jan. 26, 2021, 1:46 a.m. OK GNU C++17 (64) TESTS 5 61 2969600
105418078 angeredgecko D Jan. 25, 2021, 8:13 p.m. OK GNU C++17 (64) TESTS 5 61 3788800
105433065 adarsh_goku D Jan. 26, 2021, 3:05 a.m. OK Java 11 TESTS 5 218 3379200
105444220 blackBird D Jan. 26, 2021, 6:03 a.m. OK Java 11 TESTS 5 249 2252800
105422086 mesc08 D Jan. 25, 2021, 9:41 p.m. OK Java 11 TESTS 5 249 4608000
105412924 pk2015 D Jan. 25, 2021, 6:52 p.m. OK Java 11 TESTS 5 249 5529600
105421870 npwolverine D Jan. 25, 2021, 9:36 p.m. OK Java 11 TESTS 5 249 6144000
105420310 saurabh_kl D Jan. 25, 2021, 8:58 p.m. OK Java 11 TESTS 5 264 2252800
105437713 anshum_it_is D Jan. 26, 2021, 4:35 a.m. OK Java 11 TESTS 5 264 3993600
105421484 jaynils D Jan. 25, 2021, 9:26 p.m. OK Java 11 TESTS 5 264 5427200
105423690 0c00l D Jan. 25, 2021, 10:27 p.m. OK Java 11 TESTS 5 265 2867200
105431652 prasoonjain006 D Jan. 26, 2021, 2:36 a.m. OK Java 11 TESTS 5 265 3584000
105422007 Snow D Jan. 25, 2021, 9:39 p.m. OK Java 8 TESTS 5 140 0
105440435 dante1 D Jan. 26, 2021, 5:16 a.m. OK Java 8 TESTS 5 187 3584000
105412351 InANutshell D Jan. 25, 2021, 6:45 p.m. OK Java 8 TESTS 5 202 4096000
105416544 coolManit D Jan. 25, 2021, 7:46 p.m. OK Java 8 TESTS 5 202 4403200
105402856 Huiyinian D Jan. 25, 2021, 5:18 p.m. OK Java 8 TESTS 5 202 4505600
105422039 nandit D Jan. 25, 2021, 9:40 p.m. OK Java 8 TESTS 5 202 6553600
105416124 naitikvarshney D Jan. 25, 2021, 7:38 p.m. OK Java 8 TESTS 5 202 6758400
105414684 flyman3046 D Jan. 25, 2021, 7:15 p.m. OK Java 8 TESTS 5 218 4403200
105401879 conquerorArpit D Jan. 25, 2021, 5:13 p.m. OK Java 8 TESTS 5 218 5529600
105406435 OmarFouad D Jan. 25, 2021, 5:44 p.m. OK Java 8 TESTS 5 249 10240000
105427393 Spheniscine D Jan. 26, 2021, 12:34 a.m. OK Kotlin TESTS 5 171 0
105419551 koper D Jan. 25, 2021, 8:41 p.m. OK Kotlin TESTS 5 404 16896000
105434967 nortonlrc D Jan. 26, 2021, 3:42 a.m. OK MS C++ 2017 TESTS 5 93 3174400
105435599 Biang-Biang D Jan. 26, 2021, 3:55 a.m. OK MS C++ 2017 TESTS 5 109 5222400
105430540 jagajang D Jan. 26, 2021, 2:10 a.m. OK MS C++ 2017 TESTS 5 124 2560000
105411284 minigimbob D Jan. 25, 2021, 6:33 p.m. OK MS C++ 2017 TESTS 5 249 5529600
105410710 minigimbob D Jan. 25, 2021, 6:26 p.m. OK MS C++ 2017 TESTS 5 264 5529600
105406312 ustaritz D Jan. 25, 2021, 5:43 p.m. OK MS C++ 2017 TESTS 5 295 3379200
105403588 Albertplus007 D Jan. 25, 2021, 5:23 p.m. OK MS C++ 2017 TESTS 5 295 5632000
105404763 qing_lin D Jan. 25, 2021, 5:31 p.m. OK MS C++ 2017 TESTS 5 296 4812800
105436441 Suny_ D Jan. 26, 2021, 4:11 a.m. OK MS C++ 2017 TESTS 5 296 28057600
105403653 Gravekper D Jan. 25, 2021, 5:24 p.m. OK MS C++ 2017 TESTS 5 311 8601600
105408156 babaiserror D Jan. 25, 2021, 6 p.m. OK PyPy 2 TESTS 5 170 18022400
105444024 Rajdeep2k D Jan. 26, 2021, 6:01 a.m. OK PyPy 3 TESTS 5 249 24371200
105419775 shubh_doshi D Jan. 25, 2021, 8:46 p.m. OK PyPy 3 TESTS 5 264 21811200
105434440 srijan.sarkar D Jan. 26, 2021, 3:31 a.m. OK PyPy 3 TESTS 5 280 18841600
105443098 uttharapally.chandra D Jan. 26, 2021, 5:49 a.m. OK PyPy 3 TESTS 5 296 20992000
105410030 ____Neo____ D Jan. 25, 2021, 6:18 p.m. OK PyPy 3 TESTS 5 296 29081600
105425516 silvertint D Jan. 25, 2021, 11:25 p.m. OK PyPy 3 TESTS 5 311 19660800
105433305 Nishant__Rao D Jan. 26, 2021, 3:09 a.m. OK PyPy 3 TESTS 5 311 20480000
105429587 whddnr0218 D Jan. 26, 2021, 1:42 a.m. OK PyPy 3 TESTS 5 311 20480000
105412639 InvalidSyntax D Jan. 25, 2021, 6:48 p.m. OK PyPy 3 TESTS 5 326 19456000
105425114 silvertint D Jan. 25, 2021, 11:10 p.m. OK PyPy 3 TESTS 5 342 18022400
105415853 sh1194 D Jan. 25, 2021, 7:33 p.m. OK Python 3 TESTS 5 311 13107200
105415939 sh1194 D Jan. 25, 2021, 7:35 p.m. OK Python 3 TESTS 5 311 13209600
105403823 Shivam_Choithwani D Jan. 25, 2021, 5:25 p.m. OK Python 3 TESTS 5 311 14131200
105437545 LankGG D Jan. 26, 2021, 4:32 a.m. OK Python 3 TESTS 5 342 20889600
105431858 mkawa2 D Jan. 26, 2021, 2:40 a.m. OK Python 3 TESTS 5 374 12800000
105438274 safeers D Jan. 26, 2021, 4:45 a.m. OK Python 3 TESTS 5 389 14028800
105429885 renjied D Jan. 26, 2021, 1:50 a.m. OK Python 3 TESTS 5 405 12902400
105431457 satylogin D Jan. 26, 2021, 2:31 a.m. OK Rust TESTS 5 46 7065600
105409273 professor-flux D Jan. 25, 2021, 6:10 p.m. OK Rust TESTS 5 78 15974400
105404332 bqn D Jan. 25, 2021, 5:28 p.m. OK Rust TESTS 5 92 7577600

remove filters

Back to search problems