Educational Codeforces Round 74 (Rated for 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
1238 Educational Codeforces Round 74 (Rated for Div. 2) FINISHED False 8400 166893887 Oct. 8, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1916 ) F The Maximum Subtree PROGRAMMING dfs and similar dp graphs trees 2300

B'Assume that you have k one-dimensional segments s_1, s_2, ... s_k (each segment is denoted by two integers -- its endpoints). Then you can build the following graph on these segments. The graph consists of k vertexes, and there is an edge between the i -th and the j -th vertexes ( i neq j ) if and only if the segments s_i and s_j intersect (there exists at least one point that belongs to both of them). For example, if s_1 = [1, 6], s_2 = [8, 20], s_3 = [4, 10], s_4 = [2, 13], s_5 = [17, 18] , then the resulting graph is the following: A tree of size m is good if it is possible to choose m one-dimensional segments so that the graph built on these segments coincides with this tree. You are given a tree, you have to find its good subtree with maximum possible size. Recall that a subtree is a connected subgraph of a tree. Note that you have to answer q independent queries. The first line contains one integer q ( 1 <= q <= 15 cdot 10^4 ) -- the number of the queries. The first line of each query contains one integer n ( 2 <= n <= 3 cdot 10^5 ) -- the number of vertices in the tree. Each of the next n - 1 lines contains two integers x and y ( 1 <= x, y <= n ) denoting an edge between vertices x and y . It is guaranteed that the given graph is a tree. It is guaranteed that the sum of all n does not exceed 3 cdot 10^5 . For each query print one integer -- the maximum size of a good subtree of the given tree. In the first query there is a good subtree of size 8 . The vertices belonging to this subtree are {9, 4, 10, 2, 5, 1, 6, 3} . '...

Tutorials

Educational Codeforces Round 74 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
62154470 rainboy F Oct. 8, 2019, 4:47 p.m. OK GNU C11 TESTS 30 514 10137600 2300
62143755 I_love_Nikaidou_Shinku F Oct. 8, 2019, 3:57 p.m. OK GNU C++11 TESTS 30 46 11059200 2300
62144132 PinkRabbit F Oct. 8, 2019, 3:58 p.m. OK GNU C++11 TESTS 30 108 9830400 2300
62156368 RednaxelAlanrete F Oct. 8, 2019, 4:54 p.m. OK GNU C++11 TESTS 30 124 7372800 2300
62149308 DQS F Oct. 8, 2019, 4:22 p.m. OK GNU C++11 TESTS 30 139 26726400 2300
62149644 dysyn1314 F Oct. 8, 2019, 4:24 p.m. OK GNU C++11 TESTS 30 140 10547200 2300
62137375 QiyangAKIOI F Oct. 8, 2019, 3:31 p.m. OK GNU C++11 TESTS 30 171 9625600 2300
62146248 _smhx F Oct. 8, 2019, 4:08 p.m. OK GNU C++11 TESTS 30 171 10547200 2300
62152559 slongle F Oct. 8, 2019, 4:38 p.m. OK GNU C++11 TESTS 30 171 10547200 2300
62149493 xjd0623 F Oct. 8, 2019, 4:23 p.m. OK GNU C++11 TESTS 30 171 10854400 2300
62154248 Infinityedge F Oct. 8, 2019, 4:46 p.m. OK GNU C++11 TESTS 30 171 16793600 2300
62154422 ikun142857 F Oct. 8, 2019, 4:47 p.m. OK GNU C++14 TESTS 30 139 10956800 2300
62151549 liouzhou_101 F Oct. 8, 2019, 4:33 p.m. OK GNU C++14 TESTS 30 139 15974400 2300
62154724 Ingdasna F Oct. 8, 2019, 4:48 p.m. OK GNU C++14 TESTS 30 139 21504000 2300
62144976 beginend F Oct. 8, 2019, 4:02 p.m. OK GNU C++14 TESTS 30 155 8806400 2300
62150104 wiwitrifai F Oct. 8, 2019, 4:26 p.m. OK GNU C++14 TESTS 30 217 11878400 2300
62147504 Navick F Oct. 8, 2019, 4:13 p.m. OK GNU C++14 TESTS 30 217 11878400 2300
62156225 I_love_NanamiChiaki F Oct. 8, 2019, 4:54 p.m. OK GNU C++14 TESTS 30 218 10649600 2300
62153206 tob123 F Oct. 8, 2019, 4:41 p.m. OK GNU C++14 TESTS 30 218 10649600 2300
62142550 veljko_r F Oct. 8, 2019, 3:52 p.m. OK GNU C++14 TESTS 30 218 15462400 2300
62149820 halfblindprince F Oct. 8, 2019, 4:25 p.m. OK GNU C++14 TESTS 30 218 15462400 2300
62135211 9baka_Cirno F Oct. 8, 2019, 3:24 p.m. OK GNU C++17 TESTS 30 124 14438400 2300
62133441 9baka_Cirno F Oct. 8, 2019, 3:17 p.m. OK GNU C++17 TESTS 30 139 14438400 2300
62136389 9baka_Cirno F Oct. 8, 2019, 3:28 p.m. OK GNU C++17 TESTS 30 140 14438400 2300
62154924 bupt_magicstar F Oct. 8, 2019, 4:49 p.m. OK GNU C++17 TESTS 30 156 14950400 2300
62141924 rainbow_tree F Oct. 8, 2019, 3:49 p.m. OK GNU C++17 TESTS 30 187 12595200 2300
62147512 Felerius F Oct. 8, 2019, 4:14 p.m. OK GNU C++17 TESTS 30 202 9523200 2300
62136545 nuip F Oct. 8, 2019, 3:29 p.m. OK GNU C++17 TESTS 30 217 9523200 2300
62149386 sshs18102 F Oct. 8, 2019, 4:23 p.m. OK GNU C++17 TESTS 30 218 10649600 2300
62143199 9623 F Oct. 8, 2019, 3:54 p.m. OK GNU C++17 TESTS 30 218 10649600 2300
62142861 YaoQi F Oct. 8, 2019, 3:53 p.m. OK GNU C++17 TESTS 30 218 11571200 2300
62154037 AleksanderBalobanov F Oct. 8, 2019, 4:45 p.m. OK MS C++ 2017 TESTS 30 249 16896000 2300

remove filters

Back to search problems