Codeforces Round 916 (Div. 3)

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
1914 Codeforces Round 916 (Div. 3) FINISHED False 9000 34183463 Dec. 19, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1444 ) G2 Light Bulbs (Hard Version) PROGRAMMING combinatorics data structures dfs and similar dp ds graphs hashing

B'The easy and hard versions of this problem differ only in the constraints on n . In the hard version, the sum of values of n over all test cases does not exceed 2 cdot 10^5 . Furthermore, there are no additional constraints on the value of n in a single test case. There are 2n light bulbs arranged in a row. Each light bulb has a color from 1 to n (exactly two light bulbs for each color). Initially, all light bulbs are turned off. You choose a set of light bulbs S that you initially turn on. After that, you can perform the following operations in any order any number of times: You want to choose a set of light bulbs S that you initially turn on in such a way that by performing the described operations, you can ensure that all light bulbs are turned on. Calculate two numbers: The first line of the input contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Then follow the descriptions of the test cases. The first line of each test case contains a single integer n ( 2 <= n <= 2 cdot 10^5 ) -- the number of pairs of light bulbs. The second line of each test case contains 2n integers c_1, c_2, ... , c_{2n} ( 1 <= c_i <= n ), where c_i is the color of the i -th light bulb. For each color from 1 to n , exactly two light bulbs have this color. Additional constraint on the input: the sum of values of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output two integers: '...

Tutorials

Codeforces Round 916 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
238048687 Gassa G2 Dec. 19, 2023, 4:59 p.m. OK D TESTS 38 217 38195200
238048051 Gassa G2 Dec. 19, 2023, 4:57 p.m. OK D TESTS 38 218 38195200
238046671 Gassa G2 Dec. 19, 2023, 4:54 p.m. OK D TESTS 38 233 38195200
238049944 Gassa G2 Dec. 19, 2023, 5:01 p.m. OK D TESTS 38 311 38195200
238089343 GeoCalibur G2 Dec. 20, 2023, 3:22 a.m. OK GNU C++14 TESTS 38 124 6451200
238054330 Aqassem2004 G2 Dec. 19, 2023, 5:16 p.m. OK GNU C++14 TESTS 38 202 23347200
238088753 v2110030321 G2 Dec. 20, 2023, 3:11 a.m. OK GNU C++14 TESTS 38 234 23347200
238097331 Sky_walkerL G2 Dec. 20, 2023, 5:21 a.m. OK GNU C++14 TESTS 38 436 32358400
238079208 tamminaina_y G2 Dec. 19, 2023, 10:41 p.m. OK GNU C++14 TESTS 38 483 22118400
238087948 Martian148 G2 Dec. 20, 2023, 2:56 a.m. OK GNU C++14 TESTS 38 499 22732800
238065445 0wuming0 G2 Dec. 19, 2023, 6:46 p.m. OK GNU C++14 TESTS 38 499 438476800
238097946 luogu_bot4 G2 Dec. 20, 2023, 5:28 a.m. OK GNU C++14 TESTS 38 530 32358400
238094219 YYZNB G2 Dec. 20, 2023, 4:38 a.m. OK GNU C++14 TESTS 38 545 37068800
238048466 xvzhiming G2 Dec. 19, 2023, 4:58 p.m. OK GNU C++14 TESTS 38 1855 459264000
238090233 sh1ziku G2 Dec. 20, 2023, 3:37 a.m. OK GNU C++17 TESTS 38 124 4608000
238074095 the_compiler G2 Dec. 19, 2023, 8:40 p.m. OK GNU C++17 TESTS 38 124 8192000
238064468 buihoatchuyenhv G2 Dec. 19, 2023, 6:35 p.m. OK GNU C++17 TESTS 38 140 6758400
238093978 XHZS_XY G2 Dec. 20, 2023, 4:34 a.m. OK GNU C++17 TESTS 38 202 27648000
238077838 Intellegent G2 Dec. 19, 2023, 10:01 p.m. OK GNU C++17 TESTS 38 264 24883200
238086928 Mahm2od G2 Dec. 20, 2023, 2:33 a.m. OK GNU C++17 TESTS 38 295 32256000
238062816 gustavoleal G2 Dec. 19, 2023, 6:19 p.m. OK GNU C++17 TESTS 38 296 14643200
238093493 ywjylx G2 Dec. 20, 2023, 4:27 a.m. OK GNU C++17 TESTS 38 327 17408000
238062495 gustavoleal G2 Dec. 19, 2023, 6:16 p.m. OK GNU C++17 TESTS 38 358 80179200
238100147 AkaiLemon G2 Dec. 20, 2023, 5:54 a.m. OK GNU C++17 TESTS 38 467 24268800
238094462 jiujiumaomaoniang G2 Dec. 20, 2023, 4:42 a.m. OK GNU C++17 (64) TESTS 38 170 26726400
238065942 Owmicron G2 Dec. 19, 2023, 6:51 p.m. OK GNU C++17 (64) TESTS 38 171 16691200
238064563 Owmicron G2 Dec. 19, 2023, 6:36 p.m. OK GNU C++17 (64) TESTS 38 171 16691200
238081181 enslaved G2 Dec. 19, 2023, 11:50 p.m. OK GNU C++17 (64) TESTS 38 202 28876800
238079860 MarcosK G2 Dec. 19, 2023, 11:03 p.m. OK GNU C++17 (64) TESTS 38 217 16076800
238047016 shubhamgrg1000 G2 Dec. 19, 2023, 4:55 p.m. OK GNU C++17 (64) TESTS 38 218 48332800
238087702 fs20091003 G2 Dec. 20, 2023, 2:51 a.m. OK GNU C++17 (64) TESTS 38 234 31436800
238078477 gupta_samarth G2 Dec. 19, 2023, 10:19 p.m. OK GNU C++17 (64) TESTS 38 327 24064000
238049315 Yotsuba G2 Dec. 19, 2023, 5 p.m. OK GNU C++17 (64) TESTS 38 467 79872000
238056975 Ryougi-Shiki G2 Dec. 19, 2023, 5:32 p.m. OK GNU C++17 (64) TESTS 38 468 33792000
238080530 VectorViking G2 Dec. 19, 2023, 11:26 p.m. OK GNU C++20 (64) TESTS 38 62 4096000
238077036 Mohamed308 G2 Dec. 19, 2023, 9:41 p.m. OK GNU C++20 (64) TESTS 38 62 4812800
238051721 gqf G2 Dec. 19, 2023, 5:04 p.m. OK GNU C++20 (64) TESTS 38 62 7987200
238058890 fallleaves07 G2 Dec. 19, 2023, 5:45 p.m. OK GNU C++20 (64) TESTS 38 78 4812800
238053506 ttamx G2 Dec. 19, 2023, 5:12 p.m. OK GNU C++20 (64) TESTS 38 93 6860800
238050785 -WIDA- G2 Dec. 19, 2023, 5:03 p.m. OK GNU C++20 (64) TESTS 38 124 28364800
238046755 MinaRagy06 G2 Dec. 19, 2023, 4:54 p.m. OK GNU C++20 (64) TESTS 38 140 74547200
238091690 jiujiumaomaoniang G2 Dec. 20, 2023, 4:01 a.m. OK GNU C++20 (64) TESTS 38 155 26828800
238070584 _tempest G2 Dec. 19, 2023, 7:48 p.m. OK GNU C++20 (64) TESTS 38 155 48332800
238047555 gopikrishna000 G2 Dec. 19, 2023, 4:56 p.m. OK GNU C++20 (64) TESTS 38 155 64102400
238058946 2100032209 G2 Dec. 19, 2023, 5:46 p.m. OK Java 17 TESTS 38 1185 85811200
238066548 Dukkha G2 Dec. 19, 2023, 6:58 p.m. OK Java 21 TESTS 38 716 20684800
238055608 misorin G2 Dec. 19, 2023, 5:23 p.m. OK PyPy 3-64 TESTS 38 327 46080000
238064117 yuki_keshiki G2 Dec. 19, 2023, 6:31 p.m. OK PyPy 3-64 TESTS 38 358 55808000
238051105 kavorka G2 Dec. 19, 2023, 5:03 p.m. OK PyPy 3-64 TESTS 38 1808 62361600
238059739 Wood G2 Dec. 19, 2023, 5:52 p.m. OK PyPy 3-64 TESTS 38 1840 171212800
238085217 kavorka G2 Dec. 20, 2023, 1:53 a.m. OK PyPy 3-64 TESTS 38 2448 64102400
238050002 brown_amaurotis G2 Dec. 19, 2023, 5:01 p.m. OK Rust 2021 TESTS 38 312 34816000
238051509 brown_amaurotis G2 Dec. 19, 2023, 5:04 p.m. OK Rust 2021 TESTS 38 327 34816000

remove filters

Back to search problems