Codeforces Round 699 (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
1481 Codeforces Round 699 (Div. 2) FINISHED False 7200 119287499 Feb. 5, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19327 ) B New Colony PROGRAMMING brute force greedy implementation

B"After reaching your destination, you want to build a new colony on the new planet. Since this planet has many mountains and the colony must be built on a flat surface you decided to flatten the mountains using boulders (you are still dreaming so this makes sense to you). You are given an array h_1, h_2, ... , h_n , where h_i is the height of the i -th mountain, and k -- the number of boulders you have. You will start throwing boulders from the top of the first mountain one by one and they will roll as follows (let's assume that the height of the current mountain is h_i ): You want to find the position of the k -th boulder or determine that it will fall into the waste collection system. The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. Each test case consists of two lines. The first line in each test case contains two integers n and k ( 1 <= n <= 100 ; 1 <= k <= 10^9 ) -- the number of mountains and the number of boulders. The second line contains n integers h_1, h_2, ... , h_n ( 1 <= h_i <= 100 ) -- the height of the mountains. It is guaranteed that the sum of n over all test cases does not exceed 100 . For each test case, print -1 if the k -th boulder will fall into the collection system. Otherwise, print the position of the k -th boulder. Let's simulate the first case: The positions where each boulder stopped are the following: [2,3,2] . In the second case, all 7 boulders will stop right at the first mountain rising its height from 1 to 8 . The third case is similar to the first one but now you'll throw 5 boulders. The first three will roll in the same way as in the first test case. After that, mountain heights will be equal to [4, 3, 3, 3] , that's why the other two boulders will fall into the collection system. In the fourth case, the first and only boulders"...

Tutorials

Codeforces Round #699 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
106635466 Hieupc B Feb. 6, 2021, 2:13 a.m. OK FPC TESTS 17 31 0
106627407 CaptainShammer B Feb. 5, 2021, 9:09 p.m. OK GNU C11 TESTS 17 15 0
106605691 Gopal58 B Feb. 5, 2021, 4:31 p.m. OK GNU C11 TESTS 16 15 0
106619289 Prashantsgh B Feb. 5, 2021, 6:40 p.m. OK GNU C11 TESTS 16 15 0
106626698 Samadeol B Feb. 5, 2021, 8:47 p.m. OK GNU C11 TESTS 16 15 0
106634521 mohan7575 B Feb. 6, 2021, 1:42 a.m. OK GNU C11 TESTS 17 15 0
106637605 hoxymola B Feb. 6, 2021, 3:16 a.m. OK GNU C11 TESTS 17 15 0
106638904 Raj_kumar_ray B Feb. 6, 2021, 3:45 a.m. OK GNU C11 TESTS 17 15 0
106641567 NinjaTurtle B Feb. 6, 2021, 4:41 a.m. OK GNU C11 TESTS 17 15 0
106642620 sibo B Feb. 6, 2021, 5:03 a.m. OK GNU C11 TESTS 17 15 0
106610210 apsinghnsa B Feb. 5, 2021, 5:17 p.m. OK GNU C11 TESTS 16 30 0
106643487 z1ngOvO B Feb. 6, 2021, 5:17 a.m. OK GNU C++11 TESTS 17 15 0
106643452 No_Envy B Feb. 6, 2021, 5:16 a.m. OK GNU C++11 TESTS 17 15 0
106642144 starlightlmy B Feb. 6, 2021, 4:53 a.m. OK GNU C++11 TESTS 17 15 0
106641936 Ean1zhi B Feb. 6, 2021, 4:48 a.m. OK GNU C++11 TESTS 17 15 0
106641773 hgupta01062000 B Feb. 6, 2021, 4:45 a.m. OK GNU C++11 TESTS 17 15 0
106646718 zain_bilal2005 B Feb. 6, 2021, 6:02 a.m. OK GNU C++11 TESTS 17 15 0
106646047 wargang B Feb. 6, 2021, 5:53 a.m. OK GNU C++11 TESTS 17 15 0
106644469 wyzhf B Feb. 6, 2021, 5:31 a.m. OK GNU C++11 TESTS 17 15 0
106644438 Yu_kino B Feb. 6, 2021, 5:31 a.m. OK GNU C++11 TESTS 17 15 0
106644262 ToNTboy B Feb. 6, 2021, 5:28 a.m. OK GNU C++11 TESTS 17 15 0
106639185 zcb B Feb. 6, 2021, 3:51 a.m. OK GNU C++14 TESTS 17 15 0
106638707 mr_chocha B Feb. 6, 2021, 3:40 a.m. OK GNU C++14 TESTS 17 15 0
106645507 AkkasBodda B Feb. 6, 2021, 5:45 a.m. OK GNU C++14 TESTS 17 15 0
106645520 gulab3092 B Feb. 6, 2021, 5:45 a.m. OK GNU C++14 TESTS 17 15 0
106645686 RajShinde B Feb. 6, 2021, 5:48 a.m. OK GNU C++14 TESTS 17 15 0
106644461 dharabhishek B Feb. 6, 2021, 5:31 a.m. OK GNU C++14 TESTS 17 15 0
106643328 varshatumburu B Feb. 6, 2021, 5:14 a.m. OK GNU C++14 TESTS 17 15 0
106642823 itachi_801 B Feb. 6, 2021, 5:06 a.m. OK GNU C++14 TESTS 17 15 0
106640455 Abhi5hekk B Feb. 6, 2021, 4:18 a.m. OK GNU C++14 TESTS 17 15 0
106639904 mengxianQAQ B Feb. 6, 2021, 4:06 a.m. OK GNU C++14 TESTS 17 15 0
106645431 apoorvlodhi21 B Feb. 6, 2021, 5:44 a.m. OK GNU C++17 TESTS 17 15 0
106646674 morty B Feb. 6, 2021, 6:02 a.m. OK GNU C++17 TESTS 17 15 0
106646296 I_believe_in_myself B Feb. 6, 2021, 5:56 a.m. OK GNU C++17 TESTS 17 15 0
106646185 Parisa.Razzazi B Feb. 6, 2021, 5:55 a.m. OK GNU C++17 TESTS 17 15 0
106646105 hubbahubba B Feb. 6, 2021, 5:54 a.m. OK GNU C++17 TESTS 17 15 0
106645331 V_S_M B Feb. 6, 2021, 5:43 a.m. OK GNU C++17 TESTS 17 15 0
106645238 Lukman03 B Feb. 6, 2021, 5:42 a.m. OK GNU C++17 TESTS 17 15 0
106645151 gajanandsharmajsr B Feb. 6, 2021, 5:41 a.m. OK GNU C++17 TESTS 17 15 0
106644882 faux_gk B Feb. 6, 2021, 5:37 a.m. OK GNU C++17 TESTS 17 15 0
106644365 noobNOOBpro B Feb. 6, 2021, 5:30 a.m. OK GNU C++17 TESTS 17 15 0
106634648 froggyzhang B Feb. 6, 2021, 1:46 a.m. OK GNU C++17 (64) TESTS 17 15 0
106633789 ZibraMax B Feb. 6, 2021, 1:14 a.m. OK GNU C++17 (64) TESTS 17 15 0
106635584 timmyfeng B Feb. 6, 2021, 2:16 a.m. OK GNU C++17 (64) TESTS 17 15 0
106637059 yamate11 B Feb. 6, 2021, 3:01 a.m. OK GNU C++17 (64) TESTS 17 15 0
106638628 niloybhowmik1 B Feb. 6, 2021, 3:38 a.m. OK GNU C++17 (64) TESTS 17 15 0
106638896 Arrebol B Feb. 6, 2021, 3:45 a.m. OK GNU C++17 (64) TESTS 17 15 0
106640677 ainem B Feb. 6, 2021, 4:22 a.m. OK GNU C++17 (64) TESTS 17 15 0
106641347 .Mahdi. B Feb. 6, 2021, 4:37 a.m. OK GNU C++17 (64) TESTS 17 15 0
106641669 Proximity_ B Feb. 6, 2021, 4:43 a.m. OK GNU C++17 (64) TESTS 17 15 0
106641996 hachuochuo. B Feb. 6, 2021, 4:50 a.m. OK GNU C++17 (64) TESTS 17 15 0
106628651 rusty-tooth B Feb. 5, 2021, 9:50 p.m. OK Go TESTS 17 31 102400
106617999 kumarsaksham54 B Feb. 5, 2021, 6:23 p.m. OK Java 11 TESTS 16 156 0
106620821 i_love_heidi B Feb. 5, 2021, 7:01 p.m. OK Java 11 TESTS 16 156 0
106604328 kastori B Feb. 5, 2021, 4:28 p.m. OK Java 11 TESTS 16 170 0
106642619 Lelouch_1 B Feb. 6, 2021, 5:03 a.m. OK Java 11 TESTS 17 171 0
106646360 lucky1305 B Feb. 6, 2021, 5:57 a.m. OK Java 11 TESTS 17 171 0
106642630 Deep55 B Feb. 6, 2021, 5:03 a.m. OK Java 11 TESTS 17 171 0
106640767 aym_05 B Feb. 6, 2021, 4:24 a.m. OK Java 11 TESTS 17 171 0
106632624 tryingDream B Feb. 6, 2021, 12:30 a.m. OK Java 11 TESTS 17 171 0
106626770 zhkvn B Feb. 5, 2021, 8:49 p.m. OK Java 11 TESTS 16 171 0
106623255 area__51 B Feb. 5, 2021, 7:37 p.m. OK Java 11 TESTS 16 171 0
106614653 sama2ayman2 B Feb. 5, 2021, 5:47 p.m. OK Java 8 TESTS 16 93 0
106624849 ag157 B Feb. 5, 2021, 8:04 p.m. OK Java 8 TESTS 16 108 0
106616586 DemonSlayer18 B Feb. 5, 2021, 6:06 p.m. OK Java 8 TESTS 16 109 0
106616013 patod B Feb. 5, 2021, 6:01 p.m. OK Java 8 TESTS 16 109 0
106646567 h8script B Feb. 6, 2021, 6 a.m. OK Java 8 TESTS 17 109 0
106643036 Pranay2516 B Feb. 6, 2021, 5:10 a.m. OK Java 8 TESTS 17 109 0
106633702 Billert B Feb. 6, 2021, 1:11 a.m. OK Java 8 TESTS 17 109 0
106627659 Youha B Feb. 5, 2021, 9:17 p.m. OK Java 8 TESTS 17 109 0
106623757 abhinavsingh649 B Feb. 5, 2021, 7:45 p.m. OK Java 8 TESTS 16 109 0
106620374 Abdallah_Ragab00 B Feb. 5, 2021, 6:55 p.m. OK Java 8 TESTS 16 109 0
106611907 koboshi B Feb. 5, 2021, 5:26 p.m. OK Kotlin TESTS 16 109 0
106634550 Spheniscine B Feb. 6, 2021, 1:43 a.m. OK Kotlin TESTS 17 139 614400
106606891 wns25678 B Feb. 5, 2021, 4:33 p.m. OK Kotlin TESTS 16 140 0
106624705 catforce B Feb. 5, 2021, 8:01 p.m. OK Kotlin TESTS 16 155 1740800
106623790 catforce B Feb. 5, 2021, 7:45 p.m. OK Kotlin TESTS 16 156 1740800
106645414 yyeshell B Feb. 6, 2021, 5:44 a.m. OK MS C++ TESTS 17 30 819200
106606043 es19 B Feb. 5, 2021, 4:32 p.m. OK MS C++ TESTS 16 31 0
106636058 CoinLN B Feb. 6, 2021, 2:30 a.m. OK MS C++ 2017 TESTS 17 15 0
106618445 Rkena B Feb. 5, 2021, 6:29 p.m. OK MS C++ 2017 TESTS 16 15 0
106621502 Albertplus007 B Feb. 5, 2021, 7:10 p.m. OK MS C++ 2017 TESTS 16 15 0
106633203 njtech1921147136 B Feb. 6, 2021, 12:53 a.m. OK MS C++ 2017 TESTS 17 15 204800
106617346 AmalSN B Feb. 5, 2021, 6:15 p.m. OK MS C++ 2017 TESTS 16 30 0
106638417 Agumon B Feb. 6, 2021, 3:33 a.m. OK MS C++ 2017 TESTS 17 30 0
106638939 bkifhr10 B Feb. 6, 2021, 3:46 a.m. OK MS C++ 2017 TESTS 17 31 0
106645137 exode4 B Feb. 6, 2021, 5:41 a.m. OK MS C++ 2017 TESTS 17 31 0
106641382 TeraByte1024 B Feb. 6, 2021, 4:37 a.m. OK MS C++ 2017 TESTS 17 31 0
106639344 Archie98 B Feb. 6, 2021, 3:54 a.m. OK MS C++ 2017 TESTS 17 31 0
106631051 mban259 B Feb. 5, 2021, 11:25 p.m. OK .NET Core C# TESTS 17 92 102400
106640379 thetansquared B Feb. 6, 2021, 4:16 a.m. OK .NET Core C# TESTS 17 93 0
106620585 rsFalse B Feb. 5, 2021, 6:57 p.m. OK Perl TESTS 16 30 0
106619141 kagu B Feb. 5, 2021, 6:38 p.m. OK PyPy 2 TESTS 16 77 307200
106623594 rmhasan B Feb. 5, 2021, 7:42 p.m. OK PyPy 2 TESTS 16 77 409600
106610485 aniket11 B Feb. 5, 2021, 5:18 p.m. OK PyPy 2 TESTS 16 93 307200
106610977 maciaas B Feb. 5, 2021, 5:20 p.m. OK PyPy 2 TESTS 16 108 1638400
106634200 arin17 B Feb. 6, 2021, 1:30 a.m. OK PyPy 3 TESTS 17 93 1433600
106605569 ooj B Feb. 5, 2021, 4:31 p.m. OK PyPy 3 TESTS 16 93 1433600
106646859 slightlyskepticpotat B Feb. 6, 2021, 6:04 a.m. OK PyPy 3 TESTS 17 93 1536000
106613146 otajonov_sherzod B Feb. 5, 2021, 5:35 p.m. OK PyPy 3 TESTS 16 93 1536000
106612297 soham_mittal B Feb. 5, 2021, 5:28 p.m. OK PyPy 3 TESTS 16 93 1536000
106610886 Soulman B Feb. 5, 2021, 5:20 p.m. OK PyPy 3 TESTS 16 93 1536000
106644918 arnav2004 B Feb. 6, 2021, 5:37 a.m. OK PyPy 3 TESTS 17 93 1638400
106629442 gustavofadel B Feb. 5, 2021, 10:17 p.m. OK PyPy 3 TESTS 17 93 1638400
106620361 silvertint B Feb. 5, 2021, 6:54 p.m. OK PyPy 3 TESTS 16 93 1638400
106610504 dcshin B Feb. 5, 2021, 5:18 p.m. OK PyPy 3 TESTS 16 93 1638400
106625631 0xc0ffee B Feb. 5, 2021, 8:21 p.m. OK Python 3 TESTS 16 61 307200
106611719 nikhilgangrial B Feb. 5, 2021, 5:25 p.m. OK Python 3 TESTS 16 61 307200
106603502 Tixor B Feb. 5, 2021, 4:27 p.m. OK Python 3 TESTS 16 61 307200
106626858 nostar B Feb. 5, 2021, 8:52 p.m. OK Python 3 TESTS 16 62 0
106625875 _Asymptote_ B Feb. 5, 2021, 8:26 p.m. OK Python 3 TESTS 16 62 0
106638194 td1209 B Feb. 6, 2021, 3:28 a.m. OK Python 3 TESTS 17 62 307200
106644080 bngel B Feb. 6, 2021, 5:26 a.m. OK Python 3 TESTS 17 62 307200
106642831 euler_coder B Feb. 6, 2021, 5:06 a.m. OK Python 3 TESTS 17 62 307200
106641307 hogrider B Feb. 6, 2021, 4:36 a.m. OK Python 3 TESTS 17 62 307200
106622973 no_cry B Feb. 5, 2021, 7:32 p.m. OK Python 3 TESTS 16 62 307200
106646317 satylogin B Feb. 6, 2021, 5:57 a.m. OK Rust TESTS 17 30 0
106640346 kaki_xxx B Feb. 6, 2021, 4:15 a.m. OK Rust TESTS 17 31 0

remove filters

Back to search problems