Codeforces Round 910 (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
1898 Codeforces Round 910 (Div. 2) FINISHED False 7200 31418699 Nov. 19, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 12107 ) B Milena and Admirer PROGRAMMING greedy math

B'Milena has received an array of integers a_1, a_2, ldots, a_n of length n from a secret admirer. She thinks that making it non-decreasing should help her identify the secret admirer. She can use the following operation to make this array non-decreasing: More formally, let a_1, a_2, ldots, a_i, ldots, a_k be an array a before the operation. After the operation, it becomes equal to a_1, a_2, ldots, a_{i-1}, x, a_i - x, a_{i+1}, ldots, a_k . Note that the length of a increases by 1 on each operation. Milena can perform this operation multiple times (possibly zero). She wants you to determine the minimum number of times she should perform this operation to make array a non-decreasing. An array x_1, x_2, ldots, x_k of length k is called non-decreasing if x_i <= x_{i+1} for all 1 <= i < k . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= q t <= q 10 ,000 ). The description of test cases follows. The first line of each test case contains a single integer n ( 1 <= q n <= q 2 cdot 10^5 ) -- the length of the array a . The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= q a_i <= q 10^9 ) xe2 x80 x93 the array a . It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output one integer -- the minimum number of operations required to make the array non-decreasing. It can be shown that it is always possible to make the array a non-decreasing in the finite number of operations. In the first test case, Milena can replace the second element of array a by integers 1 and 2 , so the array would become [ , 1, , underline{1}, , underline{2}, , 2 ,] . Only 1 operation is required. In the second test case, the array a is already non-decreasing, so the answer is 0 . In the '...

Tutorials

Editorial for Codeforces Round #910 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
233502306 De-Bug B Nov. 19, 2023, 10:07 p.m. OK C# 10 TESTS 14 93 26009600
233477306 Nick2048 B Nov. 19, 2023, 5:03 p.m. OK D TESTS 14 109 13516800
233465151 daikoku B Nov. 19, 2023, 4:09 p.m. OK GNU C11 TESTS 14 93 819200
233508144 shiqi798. B Nov. 20, 2023, 1:08 a.m. OK GNU C11 TESTS 14 93 819200
233479135 ChiyoYuki_if B Nov. 19, 2023, 5:17 p.m. OK GNU C11 TESTS 14 93 1638400
233507498 Yukikazi B Nov. 20, 2023, 12:48 a.m. OK GNU C++14 TESTS 14 46 819200
233504005 DSGkvz B Nov. 19, 2023, 10:54 p.m. OK GNU C++14 TESTS 14 61 1638400
233518627 skkllll B Nov. 20, 2023, 5:04 a.m. OK GNU C++14 TESTS 14 62 819200
233515481 willing.. B Nov. 20, 2023, 4:03 a.m. OK GNU C++14 TESTS 14 62 819200
233513377 shohagfaraji B Nov. 20, 2023, 3:20 a.m. OK GNU C++14 TESTS 14 62 819200
233509814 UraykevoliQwQ B Nov. 20, 2023, 1:57 a.m. OK GNU C++14 TESTS 14 62 819200
233499602 Gold_Dragon B Nov. 19, 2023, 9:14 p.m. OK GNU C++14 TESTS 14 62 819200
233476555 TrendBattles B Nov. 19, 2023, 4:58 p.m. OK GNU C++14 TESTS 14 62 819200
233463040 Team3_Minh B Nov. 19, 2023, 4:03 p.m. OK GNU C++14 TESTS 14 62 819200
233514759 hatsuyufei B Nov. 20, 2023, 3:47 a.m. OK GNU C++14 TESTS 14 62 1638400
233515202 ag_wnl B Nov. 20, 2023, 3:56 a.m. OK GNU C++17 TESTS 14 62 819200
233514958 zbwww B Nov. 20, 2023, 3:51 a.m. OK GNU C++17 TESTS 14 62 819200
233513416 sjm150 B Nov. 20, 2023, 3:20 a.m. OK GNU C++17 TESTS 14 62 819200
233512979 amekizzz B Nov. 20, 2023, 3:11 a.m. OK GNU C++17 TESTS 14 62 819200
233515737 disastah B Nov. 20, 2023, 4:09 a.m. OK GNU C++17 TESTS 14 62 819200
233510014 Aktilek. B Nov. 20, 2023, 2:02 a.m. OK GNU C++17 TESTS 14 62 819200
233509505 vinren B Nov. 20, 2023, 1:49 a.m. OK GNU C++17 TESTS 14 62 819200
233517691 star_xiao B Nov. 20, 2023, 4:48 a.m. OK GNU C++17 TESTS 14 62 819200
233520531 Rainbow_jzy B Nov. 20, 2023, 5:34 a.m. OK GNU C++17 TESTS 14 62 819200
233511107 nlhy B Nov. 20, 2023, 2:29 a.m. OK GNU C++17 TESTS 14 62 819200
233512900 yyyyyd B Nov. 20, 2023, 3:10 a.m. OK GNU C++17 (64) TESTS 14 46 819200
233519547 imsuck12 B Nov. 20, 2023, 5:18 a.m. OK GNU C++17 (64) TESTS 14 46 819200
233518793 Mathison_Turing B Nov. 20, 2023, 5:07 a.m. OK GNU C++17 (64) TESTS 14 46 819200
233516258 ASLEH B Nov. 20, 2023, 4:20 a.m. OK GNU C++17 (64) TESTS 14 46 819200
233513488 niqiqi B Nov. 20, 2023, 3:22 a.m. OK GNU C++17 (64) TESTS 14 46 819200
233512835 MarioYC B Nov. 20, 2023, 3:08 a.m. OK GNU C++17 (64) TESTS 14 46 819200
233511411 Salo_ B Nov. 20, 2023, 2:36 a.m. OK GNU C++17 (64) TESTS 14 46 819200
233506831 ywxk B Nov. 20, 2023, 12:25 a.m. OK GNU C++17 (64) TESTS 14 46 819200
233480963 MarioYC B Nov. 19, 2023, 5:33 p.m. OK GNU C++17 (64) TESTS 14 46 819200
233479579 felipedosantosabino1 B Nov. 19, 2023, 5:21 p.m. OK GNU C++17 (64) TESTS 14 46 819200
233509764 str3ss B Nov. 20, 2023, 1:56 a.m. OK GNU C++20 (64) TESTS 14 31 819200
233508316 shengshu B Nov. 20, 2023, 1:14 a.m. OK GNU C++20 (64) TESTS 14 31 819200
233506892 Marckess B Nov. 20, 2023, 12:27 a.m. OK GNU C++20 (64) TESTS 14 31 819200
233495352 NurAman B Nov. 19, 2023, 8:12 p.m. OK GNU C++20 (64) TESTS 14 31 819200
233495025 xdaruis B Nov. 19, 2023, 8:07 p.m. OK GNU C++20 (64) TESTS 14 31 819200
233494844 Vania_Javadi B Nov. 19, 2023, 8:05 p.m. OK GNU C++20 (64) TESTS 14 31 819200
233489692 loopido B Nov. 19, 2023, 7:03 p.m. OK GNU C++20 (64) TESTS 14 31 819200
233514043 MouayadL7 B Nov. 20, 2023, 3:33 a.m. OK GNU C++20 (64) TESTS 14 31 819200
233518454 pikachu_fun B Nov. 20, 2023, 5:01 a.m. OK GNU C++20 (64) TESTS 14 31 819200
233519200 Merey_Polatkhan B Nov. 20, 2023, 5:13 a.m. OK GNU C++20 (64) TESTS 14 31 819200
233486161 1406100039 B Nov. 19, 2023, 6:25 p.m. OK Go TESTS 14 156 8089600
233477672 Bipul70701 B Nov. 19, 2023, 5:06 p.m. OK Java 11 TESTS 14 233 3993600
233509366 habib_48 B Nov. 20, 2023, 1:45 a.m. OK Java 11 TESTS 14 280 16998400
233464300 DOOMJUICE B Nov. 19, 2023, 4:06 p.m. OK Java 11 TESTS 14 295 3072000
233512239 Zhanzhe_Lee B Nov. 20, 2023, 2:57 a.m. OK Java 17 TESTS 14 249 3276800
233479799 Prime369 B Nov. 19, 2023, 5:23 p.m. OK Java 17 TESTS 14 264 3891200
233491482 Nagendravarma B Nov. 19, 2023, 7:24 p.m. OK Java 17 TESTS 14 280 3481600
233511892 mapleKing B Nov. 20, 2023, 2:49 a.m. OK Java 17 TESTS 14 296 409600
233480152 Suludardan B Nov. 19, 2023, 5:26 p.m. OK Java 17 TESTS 14 296 3481600
233501841 28leoleo28 B Nov. 19, 2023, 9:57 p.m. OK Java 17 TESTS 14 327 4608000
233462551 Liiii B Nov. 19, 2023, 4 p.m. OK Java 17 TESTS 14 483 4300800
233485173 Shitij123 B Nov. 19, 2023, 6:15 p.m. OK Java 17 TESTS 14 608 819200
233510762 one_line B Nov. 20, 2023, 2:21 a.m. OK Java 21 TESTS 14 311 2969600
233515296 darshanjan-entrepreneur B Nov. 20, 2023, 3:58 a.m. OK Java 21 TESTS 14 389 3481600
233472741 NewbiePupil B Nov. 19, 2023, 4:31 p.m. OK Java 21 TESTS 14 389 3481600
233496568 munaganithin.mnk B Nov. 19, 2023, 8:29 p.m. OK Java 21 TESTS 14 701 307200
233497593 110101011 B Nov. 19, 2023, 8:44 p.m. OK Java 8 TESTS 14 109 0
233498839 NerfThis B Nov. 19, 2023, 9:01 p.m. OK Java 8 TESTS 14 155 11161600
233517510 Java_Programmer B Nov. 20, 2023, 4:44 a.m. OK Java 8 TESTS 14 155 11366400
233490942 zhassulan018 B Nov. 19, 2023, 7:17 p.m. OK Java 8 TESTS 14 155 11878400
233480441 _ShenHua_ B Nov. 19, 2023, 5:28 p.m. OK Java 8 TESTS 14 170 0
233462567 Yousef_Badr B Nov. 19, 2023, 4 p.m. OK Java 8 TESTS 14 187 11366400
233472690 EliudGarcia2004 B Nov. 19, 2023, 4:31 p.m. OK Java 8 TESTS 14 187 13312000
233476292 Sumitsingh7 B Nov. 19, 2023, 4:57 p.m. OK Java 8 TESTS 14 202 7475200
233467909 Eslam_Ahmed B Nov. 19, 2023, 4:17 p.m. OK Java 8 TESTS 14 202 9830400
233477561 gdax B Nov. 19, 2023, 5:05 p.m. OK Java 8 TESTS 14 218 11161600
233473145 Gadi B Nov. 19, 2023, 4:32 p.m. OK MS C++ 2017 TESTS 14 187 819200
233512748 Alphacvc B Nov. 20, 2023, 3:07 a.m. OK MS C++ 2017 TESTS 14 202 48128000
233473407 555lhz B Nov. 19, 2023, 4:33 p.m. OK MS C++ 2017 TESTS 14 248 819200
233464438 IseePC2023 B Nov. 19, 2023, 4:06 p.m. OK MS C++ 2017 TESTS 14 249 819200
233475445 TheHead B Nov. 19, 2023, 4:53 p.m. OK MS C++ 2017 TESTS 14 249 1638400
233466458 Dependentia_ B Nov. 19, 2023, 4:13 p.m. OK MS C++ 2017 TESTS 14 249 1638400
233509145 Keval_78 B Nov. 20, 2023, 1:38 a.m. OK PyPy 3 TESTS 14 311 84172800
233482553 hugenoob B Nov. 19, 2023, 5:49 p.m. OK PyPy 3 TESTS 14 327 18636800
233516666 sukaya B Nov. 20, 2023, 4:28 a.m. OK PyPy 3 TESTS 14 342 19558400
233480829 Jimmily B Nov. 19, 2023, 5:32 p.m. OK PyPy 3 TESTS 14 483 19046400
233490502 Zappricious B Nov. 19, 2023, 7:11 p.m. OK PyPy 3 TESTS 14 514 17920000
233476589 RobinFromTheHood B Nov. 19, 2023, 4:59 p.m. OK PyPy 3-64 TESTS 14 124 30208000
233493083 oneku16 B Nov. 19, 2023, 7:44 p.m. OK PyPy 3-64 TESTS 14 124 30412800
233465767 AndreiZherder B Nov. 19, 2023, 4:11 p.m. OK PyPy 3-64 TESTS 14 139 20582400
233493431 ehsan.heydari.yk B Nov. 19, 2023, 7:48 p.m. OK PyPy 3-64 TESTS 14 140 27136000
233488533 gardengnome B Nov. 19, 2023, 6:50 p.m. OK PyPy 3-64 TESTS 14 140 27545600
233467601 vladislav_perchun_113 B Nov. 19, 2023, 4:16 p.m. OK PyPy 3-64 TESTS 14 140 28774400
233490450 daszybak B Nov. 19, 2023, 7:11 p.m. OK PyPy 3-64 TESTS 14 140 30208000
233488719 gardengnome B Nov. 19, 2023, 6:52 p.m. OK PyPy 3-64 TESTS 14 155 27545600
233463369 quackens B Nov. 19, 2023, 4:03 p.m. OK PyPy 3-64 TESTS 14 155 30208000
233475373 Imeon B Nov. 19, 2023, 4:53 p.m. OK PyPy 3-64 TESTS 14 155 32358400
233469568 vatsalraj B Nov. 19, 2023, 4:22 p.m. OK Python 3 TESTS 14 170 27955200
233506170 Zes_0 B Nov. 20, 2023, midnight OK Python 3 TESTS 14 186 27340800
233486609 boku B Nov. 19, 2023, 6:29 p.m. OK Python 3 TESTS 14 202 27955200
233475973 sardorboboshov B Nov. 19, 2023, 4:55 p.m. OK Python 3 TESTS 14 202 27955200
233469770 Vedanshi_Raiyani B Nov. 19, 2023, 4:23 p.m. OK Python 3 TESTS 14 202 27955200
233461580 Zes_0 B Nov. 19, 2023, 3:57 p.m. OK Python 3 TESTS 14 202 27955200
233472422 aayushasm B Nov. 19, 2023, 4:31 p.m. OK Python 3 TESTS 14 217 27340800
233482549 JasonMendoza2008 B Nov. 19, 2023, 5:49 p.m. OK Python 3 TESTS 14 217 29491200
233517845 tan36 B Nov. 20, 2023, 4:51 a.m. OK Python 3 TESTS 14 218 26419200
233472975 NarzullayevMe B Nov. 19, 2023, 4:32 p.m. OK Python 3 TESTS 14 218 27955200
233506475 0x81 B Nov. 20, 2023, 12:11 a.m. OK Ruby 3 TESTS 14 655 31027200
233513559 gr8den B Nov. 20, 2023, 3:23 a.m. OK Rust 2021 TESTS 14 31 7884800
233485852 Rajveer_100 B Nov. 19, 2023, 6:22 p.m. OK Rust 2021 TESTS 14 62 18534400

remove filters

Back to search problems