Codeforces Round 738 (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
1559 Codeforces Round 738 (Div. 2) FINISHED False 8100 108141863 Aug. 15, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2702 ) D2 Mocha and Diana (Hard Version) PROGRAMMING brute force constructive algorithms dfs and similar ds graphs greedy trees two pointers 2500

B"This is the hard version of the problem. The only difference between the two versions is the constraint on n . You can make hacks only if all versions of the problem are solved. A forest is an undirected graph without cycles (not necessarily connected). Mocha and Diana are friends in Zhijiang, both of them have a forest with nodes numbered from 1 to n , and they would like to add edges to their forests such that: Mocha and Diana want to know the maximum number of edges they can add, and which edges to add. The first line contains three integers n , m_1 and m_2 ( 1 <= n <= 10^5 , 0 <= m_1, m_2 < n ) -- the number of nodes and the number of initial edges in Mocha's forest and Diana's forest. Each of the next m_1 lines contains two integers u and v ( 1 <= u, v <= n , u neq v ) -- the edges in Mocha's forest. Each of the next m_2 lines contains two integers u and v ( 1 <= u, v <= n , u neq v ) -- the edges in Diana's forest. The first line contains only one integer h , the maximum number of edges Mocha and Diana can add. Each of the next h lines contains two integers u and v ( 1 <= u, v <= n , u neq v ) -- the edge you add each time. If there are multiple correct answers, you can print any one of them. In the first example, we cannot add any edge. In the second example, the initial forests are as follows. We can add an edge (2, 4) . "...

Tutorials

Tutorial (en)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
126734568 yzh666 D2 Aug. 23, 2021, 6:43 a.m. OK GNU C++14 TESTS 66 46 6963200 2500
126722822 tokitsukaze D2 Aug. 23, 2021, 2:17 a.m. OK GNU C++14 TESTS 66 46 7065600 2500
126253273 Visitor01 D2 Aug. 18, 2021, 10:07 a.m. OK GNU C++14 TESTS 66 62 7372800 2500
126398559 SAMSans D2 Aug. 19, 2021, 2:38 a.m. OK GNU C++14 TESTS 66 62 17203200 2500
126193395 IcMtr D2 Aug. 17, 2021, 3:33 p.m. OK GNU C++14 TESTS 66 77 5632000 2500
126227149 CrSY_Bird D2 Aug. 18, 2021, 4:15 a.m. OK GNU C++14 TESTS 66 77 8806400 2500
126420372 juruo_c D2 Aug. 19, 2021, 8:09 a.m. OK GNU C++14 TESTS 66 78 5632000 2500
126184451 Dzhao D2 Aug. 17, 2021, 1:50 p.m. OK GNU C++14 TESTS 66 78 6860800 2500
126396818 15158022064 D2 Aug. 19, 2021, 2:03 a.m. OK GNU C++14 TESTS 66 78 6860800 2500
126189109 TLE_Automat D2 Aug. 17, 2021, 2:40 p.m. OK GNU C++14 TESTS 66 78 6963200 2500
126242312 WaAccept D2 Aug. 18, 2021, 7:52 a.m. OK GNU C++17 TESTS 66 46 6860800 2500
126389147 user93957 D2 Aug. 18, 2021, 10:09 p.m. OK GNU C++17 TESTS 66 46 103833600 2500
126260251 Horb7 D2 Aug. 18, 2021, 11:32 a.m. OK GNU C++17 TESTS 66 62 19968000 2500
126950277 hydro-bot1 D2 Aug. 25, 2021, 8:25 a.m. OK GNU C++17 TESTS 66 77 5324800 2500
126449335 Door_Dark_We D2 Aug. 19, 2021, 1:28 p.m. OK GNU C++17 TESTS 66 77 6246400 2500
126191010 sanweishikong D2 Aug. 17, 2021, 3:03 p.m. OK GNU C++17 TESTS 66 77 7168000 2500
126944783 liaojiqing D2 Aug. 25, 2021, 7:20 a.m. OK GNU C++17 TESTS 66 77 37376000 2500
126961923 Maxim D2 Aug. 25, 2021, 11:02 a.m. OK GNU C++17 TESTS 66 78 6144000 2500
126731356 jjielin D2 Aug. 23, 2021, 5:50 a.m. OK GNU C++17 TESTS 66 78 6758400 2500
126763284 Bull_Demon D2 Aug. 23, 2021, 1:41 p.m. OK GNU C++17 TESTS 66 78 6758400 2500
126255873 ftiasch D2 Aug. 18, 2021, 10:41 a.m. OK GNU C++17 (64) TESTS 66 31 11980800 2500
126150578 infint D2 Aug. 17, 2021, 7:04 a.m. OK GNU C++17 (64) TESTS 65 46 8089600 2500
126153311 Chen_Henry D2 Aug. 17, 2021, 7:36 a.m. OK GNU C++17 (64) TESTS 65 46 16179200 2500
126149697 Ray_Striker D2 Aug. 17, 2021, 6:51 a.m. OK GNU C++17 (64) TESTS 65 62 7270400 2500
126922156 eblabrada_ D2 Aug. 25, 2021, 12:38 a.m. OK GNU C++17 (64) TESTS 66 62 7270400 2500
126535727 phanlong2811 D2 Aug. 20, 2021, 12:28 p.m. OK GNU C++17 (64) TESTS 66 62 7270400 2500
126397379 zykmd D2 Aug. 19, 2021, 2:15 a.m. OK GNU C++17 (64) TESTS 66 62 7270400 2500
126182276 AGRU D2 Aug. 17, 2021, 1:27 p.m. OK GNU C++17 (64) TESTS 66 62 7270400 2500
126567300 qwerty123454321 D2 Aug. 20, 2021, 7:01 p.m. OK GNU C++17 (64) TESTS 66 62 7372800 2500
126243031 xhgybbybz D2 Aug. 18, 2021, 8 a.m. OK GNU C++17 (64) TESTS 66 62 8089600 2500
126433835 ypa D2 Aug. 19, 2021, 10:45 a.m. OK Java 11 TESTS 66 280 24473600 2500
126801981 iamavalon D2 Aug. 24, 2021, 3:56 a.m. OK Java 11 TESTS 66 405 67276800 2500
126801403 iamavalon D2 Aug. 24, 2021, 3:42 a.m. OK Java 11 TESTS 66 545 102400000 2500
126171673 pks24 D2 Aug. 17, 2021, 11:25 a.m. OK Java 11 TESTS 66 904 25190400 2500
126612082 kelvinc1024 D2 Aug. 21, 2021, 10:30 a.m. OK Java 8 TESTS 66 171 20787200 2500
126223795 love1024 D2 Aug. 18, 2021, 3:05 a.m. OK Java 8 TESTS 66 171 25804800 2500
126253975 thedesalizes D2 Aug. 18, 2021, 10:17 a.m. OK Java 8 TESTS 66 202 21299200 2500
126415330 Dewansh_25 D2 Aug. 19, 2021, 7:13 a.m. OK Java 8 TESTS 66 389 49459200 2500
126231274 acidLemon D2 Aug. 18, 2021, 5:27 a.m. OK Java 8 TESTS 66 748 23040000 2500
126578336 Spheniscine D2 Aug. 21, 2021, 1:03 a.m. OK Kotlin TESTS 66 171 27033600 2500
126548071 xing_sang1 D2 Aug. 20, 2021, 2:55 p.m. OK MS C++ 2017 TESTS 66 327 7987200 2500
126919823 omerb.zeybek D2 Aug. 24, 2021, 10:39 p.m. OK MS C++ 2017 TESTS 66 638 41676800 2500
126183215 Friska D2 Aug. 17, 2021, 1:37 p.m. OK MS C++ 2017 TESTS 66 1606 77209600 2500
126183005 Friska D2 Aug. 17, 2021, 1:34 p.m. OK MS C++ 2017 TESTS 66 1965 92672000 2500
126784266 Dnk4315 D2 Aug. 23, 2021, 6:15 p.m. OK .NET Core C# TESTS 66 857 66969600 2500
126169207 mban259 D2 Aug. 17, 2021, 10:54 a.m. OK .NET Core C# TESTS 66 936 97996800 2500
126589987 guanghechen D2 Aug. 21, 2021, 5:51 a.m. OK Node.js TESTS 66 873 47923200 2500
126341391 YMSeah D2 Aug. 18, 2021, 3:59 p.m. OK PyPy 3 TESTS 66 373 35840000 2500
126672621 hsh8086 D2 Aug. 22, 2021, 7:37 a.m. OK PyPy 3 TESTS 66 420 35020800 2500
126792812 conqueror_of_tourist D2 Aug. 23, 2021, 9:49 p.m. OK PyPy 3 TESTS 66 576 36966400 2500
126932274 Rafaaaaaaaaaaaam D2 Aug. 25, 2021, 4:27 a.m. OK PyPy 3 TESTS 66 592 32256000 2500
126676993 Tiny_Snow D2 Aug. 22, 2021, 8:55 a.m. OK PyPy 3 TESTS 66 608 35635200 2500
126792772 conqueror_of_tourist D2 Aug. 23, 2021, 9:48 p.m. OK PyPy 3 TESTS 66 639 37580800 2500
126148119 manish.17 D2 Aug. 17, 2021, 6:29 a.m. OK PyPy 3 TESTS 65 670 38502400 2500
126476036 Sinocchi D2 Aug. 19, 2021, 6:09 p.m. OK PyPy 3 TESTS 66 967 61542400 2500
126676789 Tiny_Snow D2 Aug. 22, 2021, 8:52 a.m. OK PyPy 3 TESTS 66 1934 34099200 2500
126932108 Rafaaaaaaaaaaaam D2 Aug. 25, 2021, 4:24 a.m. OK PyPy 3 TESTS 66 1949 33075200 2500
126753161 abisheka1441 D2 Aug. 23, 2021, 11:18 a.m. OK Python 3 TESTS 66 1216 154214400 2500
126176473 manta1130 D2 Aug. 17, 2021, 12:22 p.m. OK Rust TESTS 66 780 8601600 2500

remove filters

Back to search problems