Codeforces Round 945 (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
1973 Codeforces Round 945 (Div. 2) FINISHED False 7200 15866699 May 17, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1916 ) D Cat, Fox and Maximum Array Split PROGRAMMING brute force interactive math 2400

B"This is an interactive problem. Fox gave Cat two positive integers n and k . She has a hidden array a_1, ldots , a_n of length n , such that 1 <= q a_i <= q n for every i . Now they are going to play the following game: For any two integers l, r such that 1 <= q l <= q r <= q n , define f(l, r) = (r - l + 1) cdot max limits_{x=l}^r a_x . In other words, f(l, r) is equal to the maximum of the subarray a_l, ldots, a_r multiplied by its size. Cat can ask Fox at most 2 n questions about the array. He will tell her two integers l and x ( 1 <= q l <= q n, 1 <= q x <= q 10^9 ), and she will tell him one integer p as the answer -- the smallest positive integer r such that f(l, r) = x , or n+1 if no such r exists. Now, Cat needs to find the largest value m such that there exists a sequence c_1, ldots, c_{k-1} such that 1 <= q c_1 < ldots < c_{k-1} < n and f(1, c_1) = f(c_1 + 1, c_2) = ldots = f(c_{k-1}+1, n) = m . If no such m exists, he should indicate this and take -1 as the answer. Note that for k = 1 , m is always equal to f(1, n) . In other words, the goal is to find the largest m such that you can split the array into exactly k subarrays ( k is the constant given to you in the beginning of the interaction) so that all the subarrays have the product of their length and their maximum equal to m , or determine that no such m exists. Every element should belong in exactly one of the subarrays. Cat doesn't know what he should do, so he asked you to play the game for him. Each test contains multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 10^3 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains two positive integers n and k ( 1 <= q k <= q n <= q 10^4$"...

Tutorials

Editorial for Codeforces Round #945 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
262377145 IceKylin D May 24, 2024, 11:31 a.m. OK C++14 (GCC 6-32) TESTS 12 93 0 2400
262129221 g1ove D May 22, 2024, 10:34 a.m. OK C++14 (GCC 6-32) TESTS 12 108 0 2400
262452893 liyouran D May 25, 2024, 3:31 a.m. OK C++14 (GCC 6-32) TESTS 12 109 0 2400
262402463 yinzihe D May 24, 2024, 2:53 p.m. OK C++14 (GCC 6-32) TESTS 12 109 0 2400
262396482 Lotuses D May 24, 2024, 2:03 p.m. OK C++14 (GCC 6-32) TESTS 12 109 0 2400
262559863 Mohamedtarekfayez D May 25, 2024, 3:18 p.m. OK C++14 (GCC 6-32) TESTS 12 124 0 2400
262397424 liuyz11 D May 24, 2024, 2:10 p.m. OK C++14 (GCC 6-32) TESTS 12 124 0 2400
262346467 heaksicn D May 24, 2024, 7:05 a.m. OK C++14 (GCC 6-32) TESTS 12 124 0 2400
261714462 cjr2010 D May 20, 2024, 2:24 a.m. OK C++14 (GCC 6-32) TESTS 12 124 0 2400
262811679 FishNotebook D May 27, 2024, 1:11 a.m. OK C++14 (GCC 6-32) TESTS 12 139 0 2400
262287317 Feet_McYeet D May 23, 2024, 4:34 p.m. OK C++17 (GCC 7-32) TESTS 12 93 0 2400
262134684 chichiro D May 22, 2024, 11:19 a.m. OK C++17 (GCC 7-32) TESTS 12 93 0 2400
261792097 ywjylx D May 20, 2024, 2:15 p.m. OK C++17 (GCC 7-32) TESTS 12 93 0 2400
261700101 awesomenick1303 D May 19, 2024, 8:19 p.m. OK C++17 (GCC 7-32) TESTS 12 93 0 2400
263648976 Shayan86 D June 1, 2024, 3:25 p.m. OK C++17 (GCC 7-32) TESTS 12 108 0 2400
263507808 lihulian D May 31, 2024, 1:53 p.m. OK C++17 (GCC 7-32) TESTS 12 108 0 2400
263404569 hhu_yjh D May 31, 2024, 3:36 a.m. OK C++17 (GCC 7-32) TESTS 12 108 0 2400
262790880 siva_sai_0 D May 26, 2024, 6:31 p.m. OK C++17 (GCC 7-32) TESTS 12 108 0 2400
261713860 I_love_Anya_Gorodilova D May 20, 2024, 2:07 a.m. OK C++17 (GCC 7-32) TESTS 12 108 0 2400
262030813 sykobeli D May 21, 2024, 2:08 p.m. OK C++17 (GCC 7-32) TESTS 12 108 102400 2400
262105632 some_like_it_hot D May 22, 2024, 7:26 a.m. OK C++20 (GCC 13-64) TESTS 12 77 0 2400
262497354 DaBest D May 25, 2024, 10:37 a.m. OK C++20 (GCC 13-64) TESTS 12 92 0 2400
261926578 PREMM_DESAI D May 20, 2024, 6:56 p.m. OK C++20 (GCC 13-64) TESTS 12 92 0 2400
261794273 Muted_slow D May 20, 2024, 2:32 p.m. OK C++20 (GCC 13-64) TESTS 12 92 0 2400
261756106 SaintDemon74 D May 20, 2024, 9:40 a.m. OK C++20 (GCC 13-64) TESTS 12 92 0 2400
263151326 XiaokQAQ D May 29, 2024, 1:52 p.m. OK C++20 (GCC 13-64) TESTS 12 93 0 2400
262669821 rxlfd314 D May 26, 2024, 7:56 a.m. OK C++20 (GCC 13-64) TESTS 12 93 0 2400
262630287 -sam D May 25, 2024, 10:55 p.m. OK C++20 (GCC 13-64) TESTS 12 93 0 2400
262368003 Its_Saikat_19 D May 24, 2024, 10:16 a.m. OK C++20 (GCC 13-64) TESTS 12 93 0 2400
262119619 Firas_Briki D May 22, 2024, 9:17 a.m. OK C++20 (GCC 13-64) TESTS 12 93 0 2400
262846123 nguyenquocthao00 D May 27, 2024, 7:51 a.m. OK Go TESTS 12 156 512000 2400
261950671 october_rain D May 21, 2024, 2:11 a.m. OK Haskell TESTS 12 530 0 2400
261706416 dzhi D May 19, 2024, 10:18 p.m. OK Java 21 TESTS 12 421 1740800 2400
261702253 hit_refresh D May 19, 2024, 8:53 p.m. OK Java 21 TESTS 12 499 1126400 2400
262955990 oneafter D May 28, 2024, 4:35 a.m. OK Java 21 TESTS 12 577 1024000 2400
262502741 kl_2200031074 D May 25, 2024, 11:26 a.m. OK Java 8 TESTS 12 609 0 2400
262486984 klu-2100030642 D May 25, 2024, 9:17 a.m. OK PyPy 3 TESTS 12 484 8806400 2400
262251162 vikram108 D May 23, 2024, 11:49 a.m. OK PyPy 3 TESTS 12 686 7168000 2400
262032248 strashila D May 21, 2024, 2:19 p.m. OK PyPy 3-64 TESTS 12 249 6246400 2400
262290230 lionel.m D May 23, 2024, 4:56 p.m. OK PyPy 3-64 TESTS 12 327 8908800 2400
261791308 cy171 D May 20, 2024, 2:09 p.m. OK PyPy 3-64 TESTS 12 343 5939200 2400
261931821 tu144x D May 20, 2024, 7:54 p.m. OK PyPy 3-64 TESTS 12 374 6348800 2400
262287084 Ryuu7 D May 23, 2024, 4:32 p.m. OK PyPy 3-64 TESTS 12 436 8396800 2400
261792495 cy171 D May 20, 2024, 2:18 p.m. OK PyPy 3-64 TESTS 12 468 8499200 2400
261778338 shubham6105 D May 20, 2024, 12:29 p.m. OK PyPy 3-64 TESTS 12 499 8704000 2400
262015950 manavspg2 D May 21, 2024, 12:29 p.m. OK PyPy 3-64 TESTS 12 515 9113600 2400
262148711 2210080018 D May 22, 2024, 12:55 p.m. OK Python 3 TESTS 12 281 0 2400
261722091 pennymagic156 D May 20, 2024, 4:47 a.m. OK Python 3 TESTS 12 312 0 2400
262337500 Svlad_Cjelli D May 24, 2024, 5:33 a.m. OK Rust 2021 TESTS 12 139 0 2400
262983550 BetterThanNobita D May 28, 2024, 8:47 a.m. OK Rust 2021 TESTS 12 140 0 2400
262347484 Svlad_Cjelli D May 24, 2024, 7:16 a.m. OK Rust 2021 TESTS 12 140 0 2400
263239177 bqn D May 30, 2024, 12:02 p.m. OK Rust 2021 TESTS 12 202 0 2400

remove filters

Back to search problems