Codeforces Round 808 (Div. 1)

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
1707 Codeforces Round 808 (Div. 1) FINISHED False 7200 79284263 July 16, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13922 ) A Doremy's IQ PROGRAMMING binary search greedy implementation

B"Doremy is asked to test n contests. Contest i can only be tested on day i . The difficulty of contest i is a_i . Initially, Doremy's IQ is q . On day i Doremy will choose whether to test contest i or not. She can only test a contest if her current IQ is strictly greater than 0 . If Doremy chooses to test contest i on day i , the following happens: Doremy wants to test as many contests as possible. Please give Doremy a solution. The input consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The first line contains two integers n and q ( 1 <= n <= 10^5 , 1 <= q <= 10^9 ) -- the number of contests and Doremy's IQ in the beginning. The second line contains n integers a_1,a_2, cdots,a_n ( 1 <= a_i <= 10^9 ) -- the difficulty of each contest. It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case, you need to output a binary string s , where s_i=1 if Doremy should choose to test contest i , and s_i=0 otherwise. The number of ones in the string should be maximum possible, and she should never test a contest when her IQ is zero or less. If there are multiple solutions, you may output any. In the first test case, Doremy tests the only contest. Her IQ doesn't decrease. In the second test case, Doremy tests both contests. Her IQ decreases by 1 after testing contest 2 . In the third test case, Doremy tests contest 1 and 2 . Her IQ decreases to 0 after testing contest 2 , so she can't test contest 3 . "...

Tutorials

104930

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
164486728 kakel_san A July 16, 2022, 3:11 p.m. OK C# 8 TESTS 27 124 8908800
164541849 KumaTachiRen A July 16, 2022, 7:16 p.m. OK C# 8 TESTS 27 187 2048000
164518166 hos.lyric A July 16, 2022, 4:14 p.m. OK D TESTS 27 46 4198400
164475306 Sigma-Sagittarius A July 16, 2022, 2:56 p.m. OK FPC TESTS 27 312 7987200
164536122 Deepanshu21249 A July 16, 2022, 6:09 p.m. OK GNU C11 TESTS 27 46 409600
164535908 Deepanshu21249 A July 16, 2022, 6:06 p.m. OK GNU C11 TESTS 27 421 409600
164557007 win10 A July 17, 2022, 12:55 a.m. OK GNU C++14 TESTS 27 30 3379200
164468879 CRJ_ZCR A July 16, 2022, 2:50 p.m. OK GNU C++14 TESTS 27 31 409600
164475858 IcMtr A July 16, 2022, 2:57 p.m. OK GNU C++14 TESTS 27 31 512000
164531755 forest A July 16, 2022, 5:30 p.m. OK GNU C++14 TESTS 27 31 512000
164509150 ghj1222 A July 16, 2022, 3:52 p.m. OK GNU C++14 TESTS 27 31 512000
164537895 Yugi.Hacker A July 16, 2022, 6:27 p.m. OK GNU C++14 TESTS 27 31 614400
164480051 t98slider A July 16, 2022, 3:02 p.m. OK GNU C++14 TESTS 27 31 614400
164575133 st_pp A July 17, 2022, 5:40 a.m. OK GNU C++14 TESTS 27 31 819200
164570534 Krystallos A July 17, 2022, 4:27 a.m. OK GNU C++14 TESTS 27 31 819200
164467713 zhaojinjia A July 16, 2022, 2:48 p.m. OK GNU C++14 TESTS 27 31 1024000
164551163 patou A July 16, 2022, 10:05 p.m. OK GNU C++17 TESTS 27 31 512000
164541680 Kilani A July 16, 2022, 7:14 p.m. OK GNU C++17 TESTS 27 31 512000
164517945 Aging1986 A July 16, 2022, 4:13 p.m. OK GNU C++17 TESTS 27 31 512000
164458220 -imc- A July 16, 2022, 2:39 p.m. OK GNU C++17 TESTS 27 31 512000
164457147 penguinhacker A July 16, 2022, 2:38 p.m. OK GNU C++17 TESTS 27 31 512000
164456887 zihouzhong A July 16, 2022, 2:38 p.m. OK GNU C++17 TESTS 27 31 512000
164557912 Splashing A July 17, 2022, 1:13 a.m. OK GNU C++17 TESTS 27 31 512000
164558413 EunBin A July 17, 2022, 1:22 a.m. OK GNU C++17 TESTS 27 31 512000
164463251 YeongTree A July 16, 2022, 2:44 p.m. OK GNU C++17 TESTS 27 31 614400
164472578 Frank_DD A July 16, 2022, 2:53 p.m. OK GNU C++17 TESTS 27 31 716800
164460019 yosupo A July 16, 2022, 2:41 p.m. OK GNU C++17 (64) TESTS 27 15 716800
164475287 Freedom__King A July 16, 2022, 2:56 p.m. OK GNU C++17 (64) TESTS 27 15 1331200
164484652 YL-9 A July 16, 2022, 3:08 p.m. OK GNU C++17 (64) TESTS 27 31 409600
164473648 Toxel A July 16, 2022, 2:55 p.m. OK GNU C++17 (64) TESTS 27 31 409600
164468012 Quang A July 16, 2022, 2:49 p.m. OK GNU C++17 (64) TESTS 27 31 409600
164486549 LamGoBrrr A July 16, 2022, 3:11 p.m. OK GNU C++17 (64) TESTS 27 31 409600
164461371 bashkort A July 16, 2022, 2:42 p.m. OK GNU C++17 (64) TESTS 27 31 409600
164571091 magnified A July 17, 2022, 4:37 a.m. OK GNU C++17 (64) TESTS 27 31 409600
164544609 over_flow A July 16, 2022, 7:56 p.m. OK GNU C++17 (64) TESTS 27 31 512000
164531346 errorgorn A July 16, 2022, 5:27 p.m. OK GNU C++17 (64) TESTS 27 31 512000
164562024 AdityaG A July 17, 2022, 2:18 a.m. OK GNU C++20 (64) TESTS 27 15 1126400
164536664 InsiApple A July 16, 2022, 6:14 p.m. OK GNU C++20 (64) TESTS 27 15 24268800
164542947 harryzhengipsum A July 16, 2022, 7:31 p.m. OK GNU C++20 (64) TESTS 27 30 409600
164526212 zeliboba A July 16, 2022, 4:33 p.m. OK GNU C++20 (64) TESTS 27 30 512000
164535028 sharmaharisam A July 16, 2022, 5:59 p.m. OK GNU C++20 (64) TESTS 27 30 1024000
164462058 plourde27 A July 16, 2022, 2:43 p.m. OK GNU C++20 (64) TESTS 27 30 1638400
164531651 LittleCube A July 16, 2022, 5:30 p.m. OK GNU C++20 (64) TESTS 27 30 1638400
164477493 ethan_enhe A July 16, 2022, 2:59 p.m. OK GNU C++20 (64) TESTS 27 30 7987200
164554513 komeiji_koishi514 A July 16, 2022, 11:46 p.m. OK GNU C++20 (64) TESTS 27 30 7987200
164553806 Kuroni A July 16, 2022, 11:24 p.m. OK GNU C++20 (64) TESTS 27 31 409600
164531360 salanger A July 16, 2022, 5:27 p.m. OK Java 11 TESTS 27 217 0
164473316 profchi A July 16, 2022, 2:54 p.m. OK Java 11 TESTS 27 296 0
164534254 PlayDate A July 16, 2022, 5:52 p.m. OK Java 11 TESTS 27 639 0
164561555 jlalba A July 17, 2022, 2:11 a.m. OK Java 17 TESTS 27 312 614400
164563964 luke.nguyen A July 17, 2022, 2:46 a.m. OK Java 17 TESTS 27 686 307200
164561042 luke.nguyen A July 17, 2022, 2:04 a.m. OK Java 17 TESTS 27 764 921600
164535963 Sussykin A July 16, 2022, 6:07 p.m. OK Java 8 TESTS 27 109 0
164572329 govindrajput A July 17, 2022, 4:58 a.m. OK Java 8 TESTS 27 124 0
164486727 Frank0628 A July 16, 2022, 3:11 p.m. OK Java 8 TESTS 27 139 0
164469237 AndreySiunov A July 16, 2022, 2:50 p.m. OK Java 8 TESTS 27 139 0
164472875 golions A July 16, 2022, 2:54 p.m. OK Java 8 TESTS 27 155 0
164466765 cc4414 A July 16, 2022, 2:47 p.m. OK Java 8 TESTS 27 155 0
164479749 SaveVMK A July 16, 2022, 3:02 p.m. OK Java 8 TESTS 27 311 0
164475474 Hakiobo A July 16, 2022, 2:57 p.m. OK Kotlin 1.4 TESTS 27 140 0
164476232 machine_solution A July 16, 2022, 2:58 p.m. OK MS C++ 2017 TESTS 27 78 1126400
164546927 chrisc A July 16, 2022, 8:34 p.m. OK Node.js TESTS 27 265 12697600
164465631 oadey89 A July 16, 2022, 2:46 p.m. OK PyPy 3 TESTS 27 186 8704000
164465916 SPD_9X2 A July 16, 2022, 2:47 p.m. OK PyPy 3 TESTS 27 186 10649600
164459770 titia A July 16, 2022, 2:41 p.m. OK PyPy 3 TESTS 27 186 12595200
164469522 eepsilon A July 16, 2022, 2:50 p.m. OK PyPy 3 TESTS 27 280 10649600
164492422 anishde85 A July 16, 2022, 3:19 p.m. OK PyPy 3 TESTS 27 592 218521600
164456766 asdsasd A July 16, 2022, 2:38 p.m. OK PyPy 3-64 TESTS 27 140 17817600
164518739 hkwu6013 A July 16, 2022, 4:15 p.m. OK PyPy 3-64 TESTS 27 155 13824000
164519879 plevande A July 16, 2022, 4:18 p.m. OK PyPy 3-64 TESTS 27 156 10035200
164463822 siganai A July 16, 2022, 2:45 p.m. OK PyPy 3-64 TESTS 27 202 16896000
164476438 huangxw A July 16, 2022, 2:58 p.m. OK PyPy 3-64 TESTS 27 249 16384000
164541694 shobonvip A July 16, 2022, 7:14 p.m. OK PyPy 3-64 TESTS 27 265 18227200
164543146 coder_sounak A July 16, 2022, 7:34 p.m. OK PyPy 3-64 TESTS 27 358 24268800
164531266 shoviknandy20 A July 16, 2022, 5:27 p.m. OK PyPy 3-64 TESTS 27 577 14233600
164538154 Rikudo_6 A July 16, 2022, 6:30 p.m. OK PyPy 3-64 TESTS 27 608 14233600
164461698 huikang A July 16, 2022, 2:43 p.m. OK PyPy 3-64 TESTS 27 701 16179200
164484122 Jimanbanashi A July 16, 2022, 3:07 p.m. OK Python 2 TESTS 27 124 5734400
164573587 rostoki A July 17, 2022, 5:18 a.m. OK Python 3 TESTS 27 139 7987200
164570533 Lhohelhohehmm A July 17, 2022, 4:27 a.m. OK Python 3 TESTS 27 187 7270400
164541146 mani1729 A July 16, 2022, 7:06 p.m. OK Python 3 TESTS 27 202 7270400
164476478 AndrescuIII A July 16, 2022, 2:58 p.m. OK Python 3 TESTS 27 202 7270400
164570617 Bishwanath A July 17, 2022, 4:29 a.m. OK Python 3 TESTS 27 202 7372800
164480915 jonathanwoenardi2 A July 16, 2022, 3:03 p.m. OK Python 3 TESTS 27 202 7680000
164570354 Lhohelhohehmm A July 17, 2022, 4:24 a.m. OK Python 3 TESTS 27 218 7782400
164569997 Lhohelhohehmm A July 17, 2022, 4:18 a.m. OK Python 3 TESTS 27 295 7270400
164505766 magnus.hegdahl A July 16, 2022, 3:44 p.m. OK Rust 2021 TESTS 27 15 512000
164463158 sansen A July 16, 2022, 2:44 p.m. OK Rust 2021 TESTS 27 31 2969600
164473013 LittleFall A July 16, 2022, 2:54 p.m. OK Rust 2021 TESTS 27 31 7884800
164469740 Russell_Emerine A July 16, 2022, 2:50 p.m. OK Rust 2021 TESTS 27 46 8396800

remove filters

Back to search problems