Codeforces Round 717 (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
1516 Codeforces Round 717 (Div. 2) FINISHED False 7200 118340711 April 21, 2021, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 23686 ) A Tit for Tat PROGRAMMING greedy

B"Given an array a of length n , you can do at most k operations of the following type on it: What is lexicographically the smallest array you can obtain? An array x is lexicographically smaller than an array y if there exists an index i such that x_i<y_i , and x_j=y_j for all 1 <= j < i . Less formally, at the first index i in which they differ, x_i<y_i . The first line contains an integer t ( 1 <= t <= 20 ) xe2 x80 x93 the number of test cases you need to solve. The first line of each test case contains 2 integers n and k ( 2 <= n <= 100 , 1 <= k <= 10000 ) -- the number of elements in the array and the maximum number of operations you can make. The second line contains n space-separated integers a_1 , a_2 , ldots , a_{n} ( 0 <= a_i <= 100 ) -- the elements of the array a . For each test case, print the lexicographically smallest array you can obtain after at most k operations. In the second test case, we start by subtracting 1 from the first element and adding 1 to the second. Then, we can't get any lexicographically smaller arrays, because we can't make any of the elements negative. "...

Tutorials

Codeforces round #717 editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
113811077 melnikov_i A April 21, 2021, 7:41 p.m. OK Clang++17 Diagnostics TESTS 8 46 1024000
113795433 spinxfr A April 21, 2021, 4:30 p.m. OK D TESTS 7 15 0
113799374 Joker1010123 A April 21, 2021, 5:07 p.m. OK GNU C11 TESTS 8 15 0
113787705 abhinandan.doomra A April 21, 2021, 3:33 p.m. OK GNU C11 TESTS 7 15 0
113808164 gupta1802anish A April 21, 2021, 7 p.m. OK GNU C11 TESTS 8 15 0
113826855 SajibKC_19 A April 22, 2021, 2:21 a.m. OK GNU C11 TESTS 9 15 102400
113831336 pranay_28 A April 22, 2021, 3:47 a.m. OK GNU C11 TESTS 9 15 2048000
113826607 JUBHAI A April 22, 2021, 2:16 a.m. OK GNU C11 TESTS 9 30 0
113791836 PiStroke A April 21, 2021, 4:07 p.m. OK GNU C11 TESTS 7 31 0
113848301 adi-AKG A April 22, 2021, 5:37 a.m. OK GNU C++11 TESTS 9 15 0
113848065 adijha29 A April 22, 2021, 5:34 a.m. OK GNU C++11 TESTS 9 15 0
113846376 WA_auto_machine A April 22, 2021, 5:07 a.m. OK GNU C++11 TESTS 9 15 0
113845073 szycool666 A April 22, 2021, 4:46 a.m. OK GNU C++11 TESTS 9 15 0
113844920 liuzhangda A April 22, 2021, 4:44 a.m. OK GNU C++11 TESTS 9 15 0
113844587 beta_dust A April 22, 2021, 4:39 a.m. OK GNU C++11 TESTS 9 15 0
113835377 pseudo-code A April 22, 2021, 4:23 a.m. OK GNU C++11 TESTS 9 15 0
113832267 srikkanthr A April 22, 2021, 4:03 a.m. OK GNU C++11 TESTS 9 15 0
113848484 invisibleeee789 A April 22, 2021, 5:39 a.m. OK GNU C++11 TESTS 9 15 0
113848469 real_man A April 22, 2021, 5:39 a.m. OK GNU C++11 TESTS 9 15 0
113848215 p.ferrari A April 22, 2021, 5:36 a.m. OK GNU C++14 TESTS 9 15 0
113847623 Aashi_22 A April 22, 2021, 5:27 a.m. OK GNU C++14 TESTS 9 15 0
113847563 isamad0201 A April 22, 2021, 5:25 a.m. OK GNU C++14 TESTS 9 15 0
113846387 under_scorer A April 22, 2021, 5:07 a.m. OK GNU C++14 TESTS 9 15 0
113846242 yashdeep10127 A April 22, 2021, 5:04 a.m. OK GNU C++14 TESTS 9 15 0
113848875 rAmanTrIpathi07 A April 22, 2021, 5:44 a.m. OK GNU C++14 TESTS 9 15 0
113849936 Somn123 A April 22, 2021, 5:58 a.m. OK GNU C++14 TESTS 9 15 0
113850014 muskan0702 A April 22, 2021, 6 a.m. OK GNU C++14 TESTS 9 15 0
113848750 s_sh A April 22, 2021, 5:42 a.m. OK GNU C++14 TESTS 9 15 0
113848476 gyanjd A April 22, 2021, 5:39 a.m. OK GNU C++14 TESTS 9 15 0
113848055 geeky__coder A April 22, 2021, 5:33 a.m. OK GNU C++17 TESTS 9 15 0
113849939 ro_hit_a_rora A April 22, 2021, 5:58 a.m. OK GNU C++17 TESTS 9 15 0
113849712 sjmf A April 22, 2021, 5:55 a.m. OK GNU C++17 TESTS 9 15 0
113849488 Rajat_34 A April 22, 2021, 5:52 a.m. OK GNU C++17 TESTS 9 15 0
113849342 paradoxhzy A April 22, 2021, 5:50 a.m. OK GNU C++17 TESTS 9 15 0
113849317 Shailabh10989 A April 22, 2021, 5:50 a.m. OK GNU C++17 TESTS 9 15 0
113849057 our A April 22, 2021, 5:47 a.m. OK GNU C++17 TESTS 9 15 0
113849042 starlordz A April 22, 2021, 5:47 a.m. OK GNU C++17 TESTS 9 15 0
113848670 zhj_god A April 22, 2021, 5:42 a.m. OK GNU C++17 TESTS 9 15 0
113847712 TanayKulkarni A April 22, 2021, 5:28 a.m. OK GNU C++17 TESTS 9 15 0
113831352 maihoona A April 22, 2021, 3:47 a.m. OK GNU C++17 (64) TESTS 9 0 0
113832423 ajai_C_R_7_ A April 22, 2021, 4:05 a.m. OK GNU C++17 (64) TESTS 9 15 0
113831386 dihaJ A April 22, 2021, 3:48 a.m. OK GNU C++17 (64) TESTS 9 15 0
113828402 DevourThemAll A April 22, 2021, 2:55 a.m. OK GNU C++17 (64) TESTS 9 15 0
113827870 __DESTROYER__ A April 22, 2021, 2:45 a.m. OK GNU C++17 (64) TESTS 9 15 0
113847719 ThuylinhTran A April 22, 2021, 5:28 a.m. OK GNU C++17 (64) TESTS 9 15 0
113848132 Aman_j1 A April 22, 2021, 5:34 a.m. OK GNU C++17 (64) TESTS 9 15 0
113848286 Forever_Pursuit A April 22, 2021, 5:36 a.m. OK GNU C++17 (64) TESTS 9 15 0
113848449 lakshaymiddha A April 22, 2021, 5:39 a.m. OK GNU C++17 (64) TESTS 9 15 0
113846632 Adikeshari A April 22, 2021, 5:11 a.m. OK GNU C++17 (64) TESTS 9 15 0
113827633 SorryNaCN A April 22, 2021, 2:39 a.m. OK Go TESTS 9 31 102400
113814837 RemyCiterin42 A April 21, 2021, 8:48 p.m. OK Haskell TESTS 8 15 102400
113791618 Helen82 A April 21, 2021, 4:06 p.m. OK Java 11 TESTS 7 171 0
113790958 ypa A April 21, 2021, 4:03 p.m. OK Java 11 TESTS 7 171 0
113845932 alan__walker A April 22, 2021, 5 a.m. OK Java 11 TESTS 9 186 0
113845524 ArcTanZ A April 22, 2021, 4:53 a.m. OK Java 11 TESTS 9 186 0
113804968 HastaLaVistaLa A April 21, 2021, 6:17 p.m. OK Java 11 TESTS 8 186 0
113801158 reddylokesh448 A April 21, 2021, 5:28 p.m. OK Java 11 TESTS 8 187 0
113792853 WalrusRamen21 A April 21, 2021, 4:12 p.m. OK Java 11 TESTS 7 187 0
113820887 procrastinate7 A April 21, 2021, 11:30 p.m. OK Java 11 TESTS 9 187 0
113813662 MagnuS_2001 A April 21, 2021, 8:26 p.m. OK Java 11 TESTS 8 187 0
113807056 Debojit219 A April 21, 2021, 6:45 p.m. OK Java 11 TESTS 8 187 0
113811467 coolManit A April 21, 2021, 7:47 p.m. OK Java 8 TESTS 8 93 0
113795389 honeysingh18 A April 21, 2021, 4:29 p.m. OK Java 8 TESTS 7 93 0
113847340 CODERSOURAV A April 22, 2021, 5:22 a.m. OK Java 8 TESTS 9 93 0
113816557 hu_tao A April 21, 2021, 9:24 p.m. OK Java 8 TESTS 8 93 0
113807318 tishrah_ A April 21, 2021, 6:49 p.m. OK Java 8 TESTS 8 93 0
113826773 udai19 A April 22, 2021, 2:19 a.m. OK Java 8 TESTS 9 108 0
113803783 ontheqt A April 21, 2021, 6:01 p.m. OK Java 8 TESTS 8 108 0
113834647 tharun.mokka564 A April 22, 2021, 4:21 a.m. OK Java 8 TESTS 9 108 0
113827147 manan29 A April 22, 2021, 2:28 a.m. OK Java 8 TESTS 9 108 0
113808898 bush117 A April 21, 2021, 7:09 p.m. OK Java 8 TESTS 8 108 0
113797151 koper A April 21, 2021, 4:44 p.m. OK Kotlin TESTS 7 124 0
113792474 PavelChadnov A April 21, 2021, 4:10 p.m. OK Kotlin TESTS 7 170 1024000
113797816 ecjtu-yangtao A April 21, 2021, 4:51 p.m. OK MS C++ TESTS 8 15 0
113797886 Amosh_ A April 21, 2021, 4:51 p.m. OK MS C++ 2017 TESTS 8 15 0
113792002 diall_38 A April 21, 2021, 4:07 p.m. OK MS C++ 2017 TESTS 7 15 0
113825022 Albertplus007 A April 22, 2021, 1:30 a.m. OK MS C++ 2017 TESTS 9 15 0
113824819 y_o_u_n_g_w_o_l_f A April 22, 2021, 1:23 a.m. OK MS C++ 2017 TESTS 9 15 0
113800303 NormanGold A April 21, 2021, 5:17 p.m. OK MS C++ 2017 TESTS 8 15 0
113825900 202003013036 A April 22, 2021, 1:58 a.m. OK MS C++ 2017 TESTS 9 15 307200
113823134 Didaren A April 22, 2021, 12:33 a.m. OK MS C++ 2017 TESTS 9 30 0
113827049 Cx330_L A April 22, 2021, 2:26 a.m. OK MS C++ 2017 TESTS 9 30 0
113817463 Ilyaiq300 A April 21, 2021, 9:48 p.m. OK MS C++ 2017 TESTS 8 31 0
113849741 glam_rider_0703 A April 22, 2021, 5:56 a.m. OK MS C++ 2017 TESTS 9 31 0
113797595 ansergeyg A April 21, 2021, 4:49 p.m. OK .NET Core C# TESTS 8 93 204800
113819618 tysonmashuq A April 21, 2021, 10:51 p.m. OK .NET Core C# TESTS 8 93 307200
113822501 henrychenOutlook A April 22, 2021, 12:16 a.m. OK Node.js TESTS 9 62 102400
113850247 didicoding A April 22, 2021, 6:03 a.m. OK Node.js TESTS 9 62 204800
113793839 Gaurav1 A April 21, 2021, 4:18 p.m. OK PyPy 2 TESTS 7 108 3481600
113847479 500068183 A April 22, 2021, 5:24 a.m. OK PyPy 3 TESTS 9 77 1331200
113845286 violist A April 22, 2021, 4:49 a.m. OK PyPy 3 TESTS 9 77 1945600
113810606 Greyhound A April 21, 2021, 7:34 p.m. OK PyPy 3 TESTS 8 92 2150400
113846996 500068183 A April 22, 2021, 5:17 a.m. OK PyPy 3 TESTS 9 93 1331200
113831820 Hiamer A April 22, 2021, 3:55 a.m. OK PyPy 3 TESTS 9 93 1331200
113825444 yowq A April 22, 2021, 1:43 a.m. OK PyPy 3 TESTS 9 93 1331200
113820434 AjJi A April 21, 2021, 11:17 p.m. OK PyPy 3 TESTS 9 93 1331200
113826920 lucifer1004 A April 22, 2021, 2:23 a.m. OK PyPy 3 TESTS 9 93 1433600
113803974 alterego_14 A April 21, 2021, 6:04 p.m. OK PyPy 3 TESTS 8 93 1740800
113798700 amr_anwr A April 21, 2021, 4:59 p.m. OK PyPy 3 TESTS 8 93 1843200
113821450 eugalt A April 21, 2021, 11:46 p.m. OK Python 3 TESTS 9 46 0
113793632 gouravtiwari237 A April 21, 2021, 4:16 p.m. OK Python 3 TESTS 7 46 0
113829299 sorahjy A April 22, 2021, 3:12 a.m. OK Python 3 TESTS 9 61 0
113823041 cozaaaaak A April 22, 2021, 12:30 a.m. OK Python 3 TESTS 9 61 0
113809496 chiraggoyal1314 A April 21, 2021, 7:18 p.m. OK Python 3 TESTS 8 61 0
113805991 coder_11 A April 21, 2021, 6:31 p.m. OK Python 3 TESTS 8 61 0
113805283 mahtab_zihan A April 21, 2021, 6:22 p.m. OK Python 3 TESTS 8 61 0
113793146 nayan007 A April 21, 2021, 4:14 p.m. OK Python 3 TESTS 7 61 0
113790679 shmits A April 21, 2021, 4:02 p.m. OK Python 3 TESTS 7 61 0
113798886 ishitva.verma2018 A April 21, 2021, 5:01 p.m. OK Python 3 TESTS 8 61 307200
113799184 uraniumcentipede A April 21, 2021, 5:05 p.m. OK Rust TESTS 8 15 0
113814599 Zoli A April 21, 2021, 8:43 p.m. OK Rust TESTS 8 31 0

remove filters

Back to search problems