Codeforces Round 615 (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
1294 Codeforces Round 615 (Div. 3) FINISHED False 7800 157649111 Jan. 22, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5966 ) F Three Paths on a Tree PROGRAMMING dfs and similar dp greedy trees 2100

B'You are given an unweighted tree with n vertices. Recall that a tree is a connected undirected graph without cycles. Your task is to choose three distinct vertices a, b, c on this tree such that the number of edges which belong to at least one of the simple paths between a and b , b and c , or a and c is the maximum possible. See the notes section for a better understanding. The simple path is the path that visits each vertex at most once. The first line contains one integer number n ( 3 <= n <= 2 cdot 10^5 ) -- the number of vertices in the tree. Next n - 1 lines describe the edges of the tree in form a_i, b_i ( 1 <= a_i , b_i <= n , a_i ne b_i ). It is guaranteed that given graph is a tree. In the first line print one integer res -- the maximum number of edges which belong to at least one of the simple paths between a and b , b and c , or a and c . In the second line print three integers a, b, c such that 1 <= a, b, c <= n and a ne, b ne c, a ne c . If there are several answers, you can print any. The picture corresponding to the first example (and another one correct answer): If you choose vertices 1, 5, 6 then the path between 1 and 5 consists of edges (1, 2), (2, 3), (3, 4), (4, 5) , the path between 1 and 6 consists of edges (1, 2), (2, 3), (3, 4), (4, 6) and the path between 5 and 6 consists of edges (4, 5), (4, 6) . The union of these paths is (1, 2), (2, 3), (3, 4), (4, 5), (4, 6) so the answer is 5 . It can be shown that there is no better answer. '...

Tutorials

Codeforces Round #615 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
70340294 ftiasch F Feb. 5, 2020, 8:15 a.m. OK D TESTS 305 655 26112000 2100
69583453 ruban F Jan. 26, 2020, 6:21 p.m. OK Delphi TESTS 305 124 132915200 2100
69544504 toterpinguin F Jan. 26, 2020, 12:56 a.m. OK GNU C11 TESTS 305 46 7270400 2100
69544177 toterpinguin F Jan. 26, 2020, 12:28 a.m. OK GNU C11 TESTS 305 62 10649600 2100
69446723 emptyboxs F Jan. 24, 2020, 3:34 a.m. OK GNU C++11 TESTS 305 46 14848000 2100
69594167 zlczlc F Jan. 27, 2020, 3:17 a.m. OK GNU C++11 TESTS 305 61 7065600 2100
69445975 emptyboxs F Jan. 24, 2020, 2:55 a.m. OK GNU C++11 TESTS 305 61 14848000 2100
69548937 wyy2004 F Jan. 26, 2020, 5:19 a.m. OK GNU C++11 TESTS 305 62 6860800 2100
70406388 vjudge4 F Feb. 6, 2020, 2:32 a.m. OK GNU C++11 TESTS 305 62 6860800 2100
70031906 TYGZ F Feb. 2, 2020, 1:06 p.m. OK GNU C++11 TESTS 305 62 7577600 2100
69607621 zhenGG F Jan. 27, 2020, 10:19 a.m. OK GNU C++11 TESTS 305 62 8294400 2100
69423114 lx_zjk F Jan. 23, 2020, 2:59 p.m. OK GNU C++11 TESTS 305 77 6246400 2100
70208116 qty_endless F Feb. 4, 2020, 7:11 a.m. OK GNU C++11 TESTS 305 77 6758400 2100
69415885 caidzh F Jan. 23, 2020, 1:05 p.m. OK GNU C++11 TESTS 305 78 7475200 2100
69471866 jhots F Jan. 24, 2020, 2:48 p.m. OK GNU C++14 TESTS 305 124 6758400 2100
69680899 CitricAcid F Jan. 28, 2020, 3:36 p.m. OK GNU C++14 TESTS 305 124 8089600 2100
69450289 NoTeamName F Jan. 24, 2020, 5:51 a.m. OK GNU C++14 TESTS 305 124 16588800 2100
69597120 Heilce F Jan. 27, 2020, 5:31 a.m. OK GNU C++14 TESTS 305 139 12288000 2100
69672521 nandonathaniel F Jan. 28, 2020, 1:24 p.m. OK GNU C++14 TESTS 305 140 6758400 2100
69718407 lfw F Jan. 29, 2020, 9:47 a.m. OK GNU C++14 TESTS 305 140 8601600 2100
69671946 nandonathaniel F Jan. 28, 2020, 1:15 p.m. OK GNU C++14 TESTS 305 140 9113600 2100
69672226 nandonathaniel F Jan. 28, 2020, 1:19 p.m. OK GNU C++14 TESTS 305 140 9113600 2100
70487124 lztnb F Feb. 7, 2020, 7:47 a.m. OK GNU C++14 TESTS 305 140 10035200 2100
70107474 Blue_Little_Eight F Feb. 3, 2020, 3:57 a.m. OK GNU C++14 TESTS 305 140 16179200 2100
69422385 vjudge5 F Jan. 23, 2020, 2:47 p.m. OK GNU C++17 TESTS 305 93 20787200 2100
70491807 wawcac F Feb. 7, 2020, 9:15 a.m. OK GNU C++17 TESTS 305 124 6758400 2100
70520812 William_Yue F Feb. 7, 2020, 5:50 p.m. OK GNU C++17 TESTS 305 124 6860800 2100
70029875 tudouuuuu F Feb. 2, 2020, 12:31 p.m. OK GNU C++17 TESTS 305 124 6963200 2100
69473689 SelfStrong_SONG F Jan. 24, 2020, 3:24 p.m. OK GNU C++17 TESTS 305 124 6963200 2100
70751053 JBer F Feb. 10, 2020, 7:02 p.m. OK GNU C++17 TESTS 305 124 6963200 2100
71095389 Code2341 F Feb. 15, 2020, 4:36 a.m. OK GNU C++17 TESTS 305 124 7987200 2100
69612532 YingLi_ZW F Jan. 27, 2020, 12:02 p.m. OK GNU C++17 TESTS 305 124 8192000 2100
69583758 .tx F Jan. 26, 2020, 6:29 p.m. OK GNU C++17 TESTS 305 124 10854400 2100
69423806 90n F Jan. 23, 2020, 3:11 p.m. OK GNU C++17 TESTS 305 124 12390400 2100
70806459 toterpinguin F Feb. 11, 2020, 6:37 p.m. OK Go TESTS 305 93 17510400 2100
70806338 toterpinguin F Feb. 11, 2020, 6:35 p.m. OK Go TESTS 305 124 17715200 2100
69472358 muoff F Jan. 24, 2020, 2:57 p.m. OK Java 11 TESTS 305 608 56934400 2100
69709679 ngzero F Jan. 29, 2020, 6:29 a.m. OK Java 11 TESTS 305 748 43417600 2100
70417047 pikapika00 F Feb. 6, 2020, 7:25 a.m. OK Java 11 TESTS 305 763 40755200 2100
69431470 lightseba F Jan. 23, 2020, 5:28 p.m. OK Java 11 TESTS 305 779 51814400 2100
69439715 bleh0.5 F Jan. 23, 2020, 8:44 p.m. OK Java 11 TESTS 305 779 54886400 2100
69709823 ngzero F Jan. 29, 2020, 6:32 a.m. OK Java 11 TESTS 305 873 59289600 2100
69529633 Anonymous F Jan. 25, 2020, 4:34 p.m. OK Java 11 TESTS 305 1372 111718400 2100
69432402 xodiac F Jan. 23, 2020, 5:46 p.m. OK Java 8 TESTS 305 218 14131200 2100
69836234 luchy0120 F Jan. 30, 2020, 11:54 a.m. OK Java 8 TESTS 305 264 17408000 2100
69443268 unicorn20141 F Jan. 24, 2020, 12:02 a.m. OK Java 8 TESTS 305 280 11366400 2100
70001745 prashanth7638 F Feb. 2, 2020, 2:11 a.m. OK Java 8 TESTS 305 327 11366400 2100
69924389 te_amo F Jan. 31, 2020, 7:40 p.m. OK Java 8 TESTS 305 530 85606400 2100
69463347 manish_98 F Jan. 24, 2020, 11:47 a.m. OK Java 8 TESTS 305 545 58675200 2100
69440962 yaoct F Jan. 23, 2020, 9:33 p.m. OK Java 8 TESTS 305 561 40550400 2100
69441703 yaoct F Jan. 23, 2020, 10:10 p.m. OK Java 8 TESTS 305 576 53862400 2100
70404881 dyhu083 F Feb. 6, 2020, 1:23 a.m. OK Java 8 TESTS 305 592 45056000 2100
69441987 Agnimandur F Jan. 23, 2020, 10:28 p.m. OK Java 8 TESTS 305 592 45670400 2100
69425389 walborn F Jan. 23, 2020, 3:38 p.m. OK JavaScript TESTS 305 998 65228800 2100
69545525 Spheniscine F Jan. 26, 2020, 2:13 a.m. OK Kotlin TESTS 305 421 23654400 2100
69518971 Spheniscine F Jan. 25, 2020, 12:53 p.m. OK Kotlin TESTS 305 452 26112000 2100
69521983 Spheniscine F Jan. 25, 2020, 1:42 p.m. OK Kotlin TESTS 305 546 23859200 2100
69521171 Spheniscine F Jan. 25, 2020, 1:29 p.m. OK Kotlin TESTS 305 592 23859200 2100
69502647 yakamoto F Jan. 25, 2020, 7:12 a.m. OK Kotlin TESTS 305 1044 72396800 2100
69446344 mban259 F Jan. 24, 2020, 3:16 a.m. OK Mono C# TESTS 305 436 23449600 2100
70468152 sakapon F Feb. 6, 2020, 9:39 p.m. OK Mono C# TESTS 305 560 34918400 2100
70467345 sakapon F Feb. 6, 2020, 9:08 p.m. OK Mono C# TESTS 305 592 35840000 2100
70418380 vjudge2 F Feb. 6, 2020, 7:52 a.m. OK MS C++ TESTS 305 109 7065600 2100
70337310 vjudge5 F Feb. 5, 2020, 7:33 a.m. OK MS C++ TESTS 305 109 9113600 2100
69654417 vjudge4 F Jan. 28, 2020, 6:48 a.m. OK MS C++ TESTS 305 124 9420800 2100
69415990 tarattata1 F Jan. 23, 2020, 1:07 p.m. OK MS C++ TESTS 305 358 30105600 2100
69905719 vjudge1 F Jan. 31, 2020, 2:05 p.m. OK MS C++ TESTS 305 374 11468800 2100
70565947 vjudge1 F Feb. 8, 2020, 1:11 p.m. OK MS C++ TESTS 305 374 12697600 2100
70120222 vjudge1 F Feb. 3, 2020, 8:27 a.m. OK MS C++ TESTS 305 421 11366400 2100
69421758 kwfumou1242 F Jan. 23, 2020, 2:36 p.m. OK MS C++ TESTS 305 436 23449600 2100
71092736 EatingMelonPublic F Feb. 15, 2020, 2:54 a.m. OK MS C++ 2017 TESTS 305 156 7270400 2100
70421394 vjudge2 F Feb. 6, 2020, 8:51 a.m. OK MS C++ 2017 TESTS 305 233 14848000 2100
70415157 vjudge5 F Feb. 6, 2020, 6:50 a.m. OK MS C++ 2017 TESTS 305 234 14848000 2100
69632185 dinaabdalla F Jan. 27, 2020, 5:30 p.m. OK MS C++ 2017 TESTS 305 421 9932800 2100
70161874 vjudge5 F Feb. 3, 2020, 3:27 p.m. OK MS C++ 2017 TESTS 305 436 11468800 2100
69445603 AlexanderL F Jan. 24, 2020, 2:35 a.m. OK MS C++ 2017 TESTS 305 436 12595200 2100
69487123 onipp F Jan. 24, 2020, 8:07 p.m. OK MS C++ 2017 TESTS 305 452 9932800 2100
69531074 CygneNoir F Jan. 25, 2020, 5:07 p.m. OK MS C++ 2017 TESTS 305 467 11776000 2100
69613175 q8514199 F Jan. 27, 2020, 12:18 p.m. OK MS C++ 2017 TESTS 305 498 9420800 2100
69463124 Ivan_Dunko F Jan. 24, 2020, 11:41 a.m. OK MS C++ 2017 TESTS 305 530 33177600 2100
70392107 jay__0208 F Feb. 5, 2020, 7:31 p.m. OK PyPy 2 TESTS 305 748 34201600 2100
69537115 MVP F Jan. 25, 2020, 7:22 p.m. OK PyPy 2 TESTS 305 935 35737600 2100
69468282 aberent F Jan. 24, 2020, 1:41 p.m. OK PyPy 3 TESTS 305 951 68096000 2100
70939097 dannyboy20031204 F Feb. 13, 2020, 7:45 a.m. OK PyPy 3 TESTS 305 966 33075200 2100
69540886 toterpinguin F Jan. 25, 2020, 9:24 p.m. OK PyPy 3 TESTS 305 998 74240000 2100
69454191 shittttyyyyyy F Jan. 24, 2020, 7:46 a.m. OK PyPy 3 TESTS 305 998 96460800 2100
70937950 dannyboy20031204 F Feb. 13, 2020, 7:21 a.m. OK PyPy 3 TESTS 305 1060 33280000 2100
69539377 toterpinguin F Jan. 25, 2020, 8:30 p.m. OK PyPy 3 TESTS 305 1091 76800000 2100
69530440 toterpinguin F Jan. 25, 2020, 4:53 p.m. OK PyPy 3 TESTS 305 1404 80179200 2100
69476411 cycleke F Jan. 24, 2020, 4:19 p.m. OK Python 3 TESTS 305 1965 24064000 2100
70806849 toterpinguin F Feb. 11, 2020, 6:46 p.m. OK Rust TESTS 305 62 14028800 2100
69730107 MVesterli F Jan. 29, 2020, 1:19 p.m. OK Rust TESTS 305 140 29696000 2100

remove filters

Back to search problems