Codeforces Round 908 (Div. 1)

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
1893 Codeforces Round 908 (Div. 1) FINISHED False 7200 32455499 Nov. 7, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2739 ) C Freedom of Choice PROGRAMMING brute force greedy implementation

B"Let's define the anti-beauty of a multiset {b_1, b_2, ldots, b_{len} } as the number of occurrences of the number len in the multiset. You are given m multisets, where the i -th multiset contains n_i distinct elements, specifically: c_{i, 1} copies of the number a_{i,1} , c_{i, 2} copies of the number a_{i,2}, ldots, c_{i, n_i} copies of the number a_{i, n_i} . It is guaranteed that a_{i, 1} < a_{i, 2} < ldots < a_{i, n_i} . You are also given numbers l_1, l_2, ldots, l_m and r_1, r_2, ldots, r_m such that 1 <= l_i <= r_i <= c_{i, 1} + ldots + c_{i, n_i} . Let's create a multiset X , initially empty. Then, for each i from 1 to m , you must perform the following action exactly once: You need to choose v_1, ldots, v_m and the added numbers in such a way that the resulting multiset X has the minimum possible anti-beauty. Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer m ( 1 <= m <= 10^5 ) -- the number of given multisets. Then, for each i from 1 to m , a data block consisting of three lines is entered. The first line of each block contains three integers n_i, l_i, r_i ( 1 <= n_i <= 10^5, 1 <= l_i <= r_i <= c_{i, 1} + ldots + c_{i, n_i} <= 10^{17} ) -- the number of distinct numbers in the i -th multiset and the limits on the number of elements to be added to X from the i -th multiset. The second line of the block contains n_i integers a_{i, 1}, ldots, a_{i, n_i} ( 1 <= a_{i, 1} < ldots < a_{i, n_i} <= 10^{17} ) -- the distinct elements of the i -th multiset. The third line of the block contains n_i integers c_{i, 1}, ldots, c_{i, n_i} "...

Tutorials

Codeforces Round 908 (Div. 1, Div, 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
231782978 KumaTachiRen C Nov. 7, 2023, 3:55 p.m. OK C# 8 TESTS 23 202 34304000
231836153 Gassa C Nov. 7, 2023, 6:13 p.m. OK D TESTS 24 343 24576000
231862147 Gassa C Nov. 7, 2023, 9:33 p.m. OK D TESTS 24 358 24576000
231833462 Gassa C Nov. 7, 2023, 5:50 p.m. OK D TESTS 24 358 24576000
231863056 Gassa C Nov. 7, 2023, 9:50 p.m. OK D TESTS 24 373 24576000
231831741 Gassa C Nov. 7, 2023, 5:37 p.m. OK D TESTS 24 389 55705600
231830623 Gassa C Nov. 7, 2023, 5:29 p.m. OK D TESTS 24 467 55705600
231840077 rainboy C Nov. 7, 2023, 6:52 p.m. OK GNU C11 TESTS 24 139 4812800
231775486 wangyian2022 C Nov. 7, 2023, 3:36 p.m. OK GNU C++14 TESTS 23 124 22425600
231787696 Ricky2021 C Nov. 7, 2023, 4:08 p.m. OK GNU C++14 TESTS 23 155 22118400
231775073 StarSilk C Nov. 7, 2023, 3:35 p.m. OK GNU C++14 TESTS 23 156 10240000
231807366 tkxkd C Nov. 7, 2023, 4:24 p.m. OK GNU C++14 TESTS 23 171 10649600
231767073 yinjun2024 C Nov. 7, 2023, 3:18 p.m. OK GNU C++14 TESTS 23 171 103424000
231770874 yydtq C Nov. 7, 2023, 3:25 p.m. OK GNU C++14 TESTS 23 171 116838400
231761512 harinboy C Nov. 7, 2023, 3:07 p.m. OK GNU C++14 TESTS 23 186 11264000
231778275 Muelsyse C Nov. 7, 2023, 3:43 p.m. OK GNU C++14 TESTS 23 187 7987200
231776401 awoo C Nov. 7, 2023, 3:38 p.m. OK GNU C++14 TESTS 23 187 10854400
231772050 crescent_yhw C Nov. 7, 2023, 3:28 p.m. OK GNU C++14 TESTS 23 187 11264000
231839988 HemeshDJ C Nov. 7, 2023, 6:51 p.m. OK GNU C++17 TESTS 24 155 9830400
231838660 Mdominykas C Nov. 7, 2023, 6:36 p.m. OK GNU C++17 TESTS 24 170 13004800
231775093 happy.potato C Nov. 7, 2023, 3:35 p.m. OK GNU C++17 TESTS 23 171 8192000
231776820 fengchang C Nov. 7, 2023, 3:39 p.m. OK GNU C++17 TESTS 23 171 10240000
231816875 bthero C Nov. 7, 2023, 4:29 p.m. OK GNU C++17 TESTS 23 171 10342400
231797431 KroosTheKeenGlint C Nov. 7, 2023, 4:18 p.m. OK GNU C++17 TESTS 23 171 10649600
231776792 Pyqe C Nov. 7, 2023, 3:39 p.m. OK GNU C++17 TESTS 23 171 11366400
231784768 mickey080929 C Nov. 7, 2023, 4 p.m. OK GNU C++17 TESTS 23 171 11366400
231762806 potato167 C Nov. 7, 2023, 3:09 p.m. OK GNU C++17 TESTS 23 171 11468800
231779979 yy_chen C Nov. 7, 2023, 3:47 p.m. OK GNU C++17 TESTS 23 171 11878400
231816854 Hackenbush C Nov. 7, 2023, 4:29 p.m. OK GNU C++17 (64) TESTS 23 108 24780800
231773627 YeongTree C Nov. 7, 2023, 3:32 p.m. OK GNU C++17 (64) TESTS 23 124 7987200
231770834 HuaJun C Nov. 7, 2023, 3:25 p.m. OK GNU C++17 (64) TESTS 23 124 9625600
231777680 Barichek C Nov. 7, 2023, 3:42 p.m. OK GNU C++17 (64) TESTS 23 124 9830400
231786511 MrPizza C Nov. 7, 2023, 4:05 p.m. OK GNU C++17 (64) TESTS 23 124 10137600
231762547 hitonanode C Nov. 7, 2023, 3:09 p.m. OK GNU C++17 (64) TESTS 23 124 10547200
231779673 Zan C Nov. 7, 2023, 3:46 p.m. OK GNU C++17 (64) TESTS 23 124 10649600
231769096 Rubikun C Nov. 7, 2023, 3:22 p.m. OK GNU C++17 (64) TESTS 23 124 12288000
231882559 y_combinator C Nov. 8, 2023, 4:24 a.m. OK GNU C++17 (64) TESTS 24 124 13312000
231778844 natsugiri C Nov. 7, 2023, 3:44 p.m. OK GNU C++17 (64) TESTS 23 124 15360000
231777393 Vercingetorix C Nov. 7, 2023, 3:41 p.m. OK GNU C++20 (64) TESTS 23 46 14336000
231886004 rui_er C Nov. 8, 2023, 5:16 a.m. OK GNU C++20 (64) TESTS 24 46 14643200
231801521 rui_er C Nov. 7, 2023, 4:20 p.m. OK GNU C++20 (64) TESTS 23 61 14643200
231789428 Wolam C Nov. 7, 2023, 4:13 p.m. OK GNU C++20 (64) TESTS 23 77 7270400
231762109 Golovanov399 C Nov. 7, 2023, 3:08 p.m. OK GNU C++20 (64) TESTS 23 93 8499200
231815840 NeKpoT C Nov. 7, 2023, 4:27 p.m. OK GNU C++20 (64) TESTS 23 93 8908800
231819052 tdzl2003 C Nov. 7, 2023, 4:34 p.m. OK GNU C++20 (64) TESTS 23 93 11264000
231778460 KoreaL2KStRiKe C Nov. 7, 2023, 3:43 p.m. OK GNU C++20 (64) TESTS 23 93 11264000
231774075 ko_osaga C Nov. 7, 2023, 3:33 p.m. OK GNU C++20 (64) TESTS 23 93 11673600
231819092 Turkhuuu C Nov. 7, 2023, 4:34 p.m. OK GNU C++20 (64) TESTS 23 93 11673600
231805964 HugeHobbit C Nov. 7, 2023, 4:24 p.m. OK Java 11 TESTS 23 452 15667200
231829630 FierteDeCeylan C Nov. 7, 2023, 5:23 p.m. OK Java 11 TESTS 24 545 19660800
231825624 frey4 C Nov. 7, 2023, 5:01 p.m. OK Java 21 TESTS 24 608 34099200
231800267 yvbf C Nov. 7, 2023, 4:19 p.m. OK Java 8 TESTS 23 249 17305600
231782112 golions C Nov. 7, 2023, 3:53 p.m. OK Java 8 TESTS 23 327 44134400
231816150 hxu10 C Nov. 7, 2023, 4:28 p.m. OK PyPy 3 TESTS 23 794 66764800
231833181 zouyu9631 C Nov. 7, 2023, 5:48 p.m. OK PyPy 3-64 TESTS 24 264 36147200
231790890 misorin C Nov. 7, 2023, 4:17 p.m. OK PyPy 3-64 TESTS 23 280 32153600
231831814 zouyu9631 C Nov. 7, 2023, 5:38 p.m. OK PyPy 3-64 TESTS 24 296 37683200
231833071 zouyu9631 C Nov. 7, 2023, 5:47 p.m. OK PyPy 3-64 TESTS 24 311 36249600
231778526 codicon C Nov. 7, 2023, 3:44 p.m. OK PyPy 3-64 TESTS 23 373 45465600
231781775 t0mmyn C Nov. 7, 2023, 3:52 p.m. OK PyPy 3-64 TESTS 23 389 36761600
231800218 eepsilon C Nov. 7, 2023, 4:19 p.m. OK PyPy 3-64 TESTS 23 405 62976000
231859848 Alex239 C Nov. 7, 2023, 8:55 p.m. OK PyPy 3-64 TESTS 24 436 36864000
231836146 alexwice C Nov. 7, 2023, 6:13 p.m. OK PyPy 3-64 TESTS 24 451 55296000
231776657 dabbler1 C Nov. 7, 2023, 3:39 p.m. OK PyPy 3-64 TESTS 23 452 76697600
231768180 Egor C Nov. 7, 2023, 3:20 p.m. OK Rust 2021 TESTS 23 93 20889600
231827790 robostac C Nov. 7, 2023, 5:12 p.m. OK Rust 2021 TESTS 24 124 34099200
231790443 ngtkana C Nov. 7, 2023, 4:16 p.m. OK Rust 2021 TESTS 23 156 25804800

remove filters

Back to search problems