Codeforces Round 860 (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
1798 Codeforces Round 860 (Div. 2) FINISHED False 7200 57338663 March 26, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1662 ) E Multitest Generator PROGRAMMING brute force dp 2300

B'Let 's call an array b_1, b_2, ldots, b_m a test if b_1 = m - 1 . Let 's call an array b_1, b_2, ldots, b_m a multitest if the array b_2, b_3, ldots, b_m can be split into b_1 non-empty subarrays so that each of these subarrays is a test. Note that each element of the array must be included in exactly one subarray, and the subarrays must consist of consecutive elements. Let 's define the function f from the array b_1, b_2, ldots, b_m as the minimum number of operations of the form "Replace any b_i with any non-negative integer x ", which needs to be done so that the array b_1, b_2, ldots, b_m becomes a multitest. You are given an array of positive integers a_1, a_2, ldots, a_n . For each i from 1 to n - 1 , find f([a_i, a_{i+1}, ldots, a_n]) . Below are some examples of tests and multitests. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 300 ,000 ). The description of the test cases follows. The first line of each test case contains a single integer n ( 2 <= n <= 300 ,000 ) -- the length of the array a . The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 300 ,000 ) -- elements of the array a . It is guaranteed that the sum of n over all test cases does not exceed 300 ,000 . For each test case print n - 1 numbers -- f([a_i, a_{i+1}, ldots, a_n]) for each i from 1 to n - 1 . In the first test case of the first test the array [1, 2, 1, 7] is a multitest since the array [2, 1, 7] is a test. The array [2, 1, 7] is not a multitest, but after replacing the first number with 1 , an array [1, 1, 7] is obtained, which is a multitest. The array [1, 7] is also not a multitest, but the array [1, 0] is, so f([1, 7]) = 1 . In the second test case '...

Tutorials

Editorial of Codeforces Round 860 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
199560640 CaveNightingale E March 28, 2023, 3:54 p.m. OK GNU C11 TESTS 51 1263 5120000 2300
199927380 JiangRH E March 31, 2023, 9:33 a.m. OK GNU C++14 TESTS 51 93 6041600 2300
199626039 littlestarQwQ E March 29, 2023, 6:34 a.m. OK GNU C++14 TESTS 51 93 36044800 2300
199427342 yinyizhe E March 27, 2023, 3:09 p.m. OK GNU C++14 TESTS 51 108 4812800 2300
199777683 2018ljw E March 30, 2023, 3:44 a.m. OK GNU C++14 TESTS 51 108 4812800 2300
199611891 CJ_xde_lt E March 29, 2023, 3:03 a.m. OK GNU C++14 TESTS 51 108 16076800 2300
199528496 wsyhb E March 28, 2023, 11:53 a.m. OK GNU C++14 TESTS 51 109 3584000 2300
199502233 _jsgnt E March 28, 2023, 7:30 a.m. OK GNU C++14 TESTS 51 109 4812800 2300
199430597 FishAndCat E March 27, 2023, 3:36 p.m. OK GNU C++14 TESTS 51 109 4812800 2300
199507200 Yuki991 E March 28, 2023, 8:26 a.m. OK GNU C++14 TESTS 51 109 4812800 2300
199770052 yfzxxf_LSP E March 30, 2023, 12:56 a.m. OK GNU C++14 TESTS 51 109 6041600 2300
200076599 RandomCar E April 1, 2023, 5:25 a.m. OK GNU C++17 TESTS 51 108 4505600 2300
199403717 BhavayGoyal E March 27, 2023, 12:08 p.m. OK GNU C++17 TESTS 51 108 4812800 2300
199496137 sam1212 E March 28, 2023, 6:21 a.m. OK GNU C++17 TESTS 51 108 4812800 2300
199403828 devanshpareek E March 27, 2023, 12:09 p.m. OK GNU C++17 TESTS 51 109 3584000 2300
199587706 codeAlxx E March 28, 2023, 8:05 p.m. OK GNU C++17 TESTS 51 109 3584000 2300
199604310 hehaodele E March 29, 2023, 12:20 a.m. OK GNU C++17 TESTS 51 109 4812800 2300
199510964 ayersz E March 28, 2023, 9:06 a.m. OK GNU C++17 TESTS 51 109 4812800 2300
199455030 prakhar7472pk E March 27, 2023, 7:17 p.m. OK GNU C++17 TESTS 51 109 4812800 2300
199451255 prakhar7472pk E March 27, 2023, 6:37 p.m. OK GNU C++17 TESTS 51 109 4812800 2300
200028091 ayersz E March 31, 2023, 5:39 p.m. OK GNU C++17 TESTS 51 109 4812800 2300
199426627 UltramanDecker E March 27, 2023, 3:03 p.m. OK GNU C++17 (64) TESTS 51 62 6348800 2300
199628026 Antichain E March 29, 2023, 6:58 a.m. OK GNU C++17 (64) TESTS 51 77 6041600 2300
199429875 gqf123 E March 27, 2023, 3:30 p.m. OK GNU C++17 (64) TESTS 51 78 6041600 2300
199593401 PLA_Nh E March 28, 2023, 9:08 p.m. OK GNU C++17 (64) TESTS 51 78 9625600 2300
199427850 gqf123 E March 27, 2023, 3:13 p.m. OK GNU C++17 (64) TESTS 51 78 15564800 2300
199789481 chiruno233 E March 30, 2023, 6:48 a.m. OK GNU C++17 (64) TESTS 51 93 3584000 2300
199713324 iamttm E March 29, 2023, 2:04 p.m. OK GNU C++17 (64) TESTS 51 93 4812800 2300
199400869 BigMonster E March 27, 2023, 11:43 a.m. OK GNU C++17 (64) TESTS 51 93 4812800 2300
199769913 Lonely. E March 30, 2023, 12:53 a.m. OK GNU C++17 (64) TESTS 51 93 6041600 2300
200068455 weakestOsuPlayer_244 E April 1, 2023, 3:36 a.m. OK GNU C++17 (64) TESTS 51 93 7270400 2300
199651991 CLT E March 29, 2023, 9:31 a.m. OK GNU C++20 (64) TESTS 51 31 11878400 2300
199415418 laurxh E March 27, 2023, 1:41 p.m. OK GNU C++20 (64) TESTS 51 46 6041600 2300
199817936 neonmoon E March 30, 2023, 11:50 a.m. OK GNU C++20 (64) TESTS 51 46 6144000 2300
199479226 davi-v E March 28, 2023, 1:34 a.m. OK GNU C++20 (64) TESTS 51 61 3584000 2300
199572224 yaroslav06 E March 28, 2023, 5:26 p.m. OK GNU C++20 (64) TESTS 51 62 3584000 2300
199480295 ItzDesert E March 28, 2023, 2:01 a.m. OK GNU C++20 (64) TESTS 51 62 3584000 2300
199617588 pecksniff E March 29, 2023, 4:39 a.m. OK GNU C++20 (64) TESTS 51 62 3584000 2300
200077559 lazyhash E April 1, 2023, 5:36 a.m. OK GNU C++20 (64) TESTS 51 62 4812800 2300
199957058 Fido_Puppy E March 31, 2023, 2:30 p.m. OK GNU C++20 (64) TESTS 51 62 4812800 2300
199956965 LegendaryGrandmasterLjm E March 31, 2023, 2:29 p.m. OK GNU C++20 (64) TESTS 51 62 4812800 2300
199437539 Ani_S E March 27, 2023, 4:32 p.m. OK Java 17 TESTS 51 327 16179200 2300
200025964 merlin_ E March 31, 2023, 5:25 p.m. OK Java 17 TESTS 51 389 26624000 2300
199471254 Yuh_03 E March 27, 2023, 10:32 p.m. OK Java 17 TESTS 51 811 29081600 2300
199923295 yvbf E March 31, 2023, 8:47 a.m. OK Java 8 TESTS 51 171 0 2300
199592075 Ziran3234 E March 28, 2023, 8:53 p.m. OK Java 8 TESTS 51 1076 28672000 2300
199855744 toam E March 30, 2023, 4:19 p.m. OK PyPy 3-64 TESTS 51 249 41984000 2300
199516040 Yansou E March 28, 2023, 9:59 a.m. OK PyPy 3-64 TESTS 51 249 46592000 2300
199526158 flygon E March 28, 2023, 11:34 a.m. OK PyPy 3-64 TESTS 51 280 39321600 2300
199890375 Mars_FN E March 30, 2023, 10:48 p.m. OK PyPy 3-64 TESTS 51 296 48230400 2300
199401355 1_2_3_4_5_9 E March 27, 2023, 11:48 a.m. OK PyPy 3-64 TESTS 51 296 56320000 2300
199858621 -Neel- E March 30, 2023, 4:43 p.m. OK PyPy 3-64 TESTS 51 311 39321600 2300
199409249 Ye_Che E March 27, 2023, 12:54 p.m. OK PyPy 3-64 TESTS 51 326 46796800 2300
199489279 mr_robot_96x E March 28, 2023, 4:45 a.m. OK PyPy 3-64 TESTS 51 342 48230400 2300
199456820 Kita E March 27, 2023, 7:38 p.m. OK PyPy 3-64 TESTS 51 343 46387200 2300
199406813 abhaumik24 E March 27, 2023, 12:34 p.m. OK PyPy 3-64 TESTS 51 405 47616000 2300
199892835 rannn E March 30, 2023, 11:42 p.m. OK Python 3 TESTS 51 1091 20480000 2300
199830531 FLY_lai E March 30, 2023, 1:38 p.m. OK Python 3 TESTS 51 1278 32460800 2300
199738893 pankratov-va E March 29, 2023, 5:40 p.m. OK Python 3 TESTS 51 1278 32460800 2300
199562206 Harish_777 E March 28, 2023, 4:06 p.m. OK Python 3 TESTS 51 1278 32460800 2300
199498947 CHARMIPADMAJA E March 28, 2023, 6:54 a.m. OK Python 3 TESTS 51 1278 32460800 2300
199484010 2000030180 E March 28, 2023, 3:20 a.m. OK Python 3 TESTS 51 1278 32460800 2300
199482017 i_went_to_cmu E March 28, 2023, 2:40 a.m. OK Python 3 TESTS 51 1278 32460800 2300

remove filters

Back to search problems