Codeforces Round 480 (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
980 Codeforces Round 480 (Div. 2) FINISHED False 7200 211733723 May 8, 2018, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 200 ) F Cactus to Tree PROGRAMMING dp graphs trees 2900

B'You are given a special connected undirected graph where each vertex belongs to at most one simple cycle. Your task is to remove as many edges as needed to convert this graph into a tree (connected graph with no cycles). For each node, independently, output the maximum distance between it and a leaf in the resulting tree, assuming you were to remove the edges in a way that minimizes this distance. The first line of input contains two integers n and m ( 1 <= q n <= q 5 cdot 10^5 ), the number of nodes and the number of edges, respectively. Each of the following m lines contains two integers u and v ( 1 <= q u,v <= q n , u ne v ), and represents an edge connecting the two nodes u and v . Each pair of nodes is connected by at most one edge. It is guaranteed that the given graph is connected and each vertex belongs to at most one simple cycle. Print n space-separated integers, the i -th integer represents the maximum distance between node i and a leaf if the removed edges were chosen in a way that minimizes this distance. In the first sample, a possible way to minimize the maximum distance from vertex 1 is by removing the marked edges in the following image: Note that to minimize the answer for different nodes, you can remove different edges. '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
41606272 vjudge2 F Aug. 15, 2018, 2:43 a.m. OK GNU C++ TESTS 144 373 160972800 2900
41296017 Serval F Aug. 7, 2018, 7:14 a.m. OK GNU C++ TESTS 144 498 110796800 2900
42347840 CalvinJin F Sept. 2, 2018, 12:23 a.m. OK GNU C++ TESTS 144 499 72704000 2900
42332302 CalvinJin F Sept. 1, 2018, 11:04 a.m. OK GNU C++ TESTS 144 545 74752000 2900
42331294 CalvinJin F Sept. 1, 2018, 10:14 a.m. OK GNU C++ TESTS 144 576 74752000 2900
41296114 vjudge4 F Aug. 7, 2018, 7:17 a.m. OK GNU C++ TESTS 144 624 110796800 2900
40186668 zhouzhendong F July 11, 2018, 2:18 a.m. OK GNU C++ TESTS 144 670 152985600 2900
40186691 vjudge1 F July 11, 2018, 2:19 a.m. OK GNU C++ TESTS 144 685 152985600 2900
40186636 zhouzhendong F July 11, 2018, 2:16 a.m. OK GNU C++ TESTS 144 716 152985600 2900
41383536 luogu_bot4 F Aug. 9, 2018, 3:58 a.m. OK GNU C++ TESTS 144 717 106393600 2900
42823754 Isrothy F Sept. 13, 2018, 8:35 a.m. OK GNU C++11 TESTS 144 218 92672000 2900
42823354 Isrothy F Sept. 13, 2018, 8:19 a.m. OK GNU C++11 TESTS 144 233 92672000 2900
42823347 Isrothy F Sept. 13, 2018, 8:19 a.m. OK GNU C++11 TESTS 144 280 92672000 2900
58316303 waaadreamer F Aug. 5, 2019, 3:06 a.m. OK GNU C++11 TESTS 144 389 125235200 2900
42823599 Onozuka F Sept. 13, 2018, 8:28 a.m. OK GNU C++11 TESTS 144 405 74240000 2900
57869748 lopare F July 28, 2019, 12:36 a.m. OK GNU C++11 TESTS 144 421 73932800 2900
41606268 ouqingliang F Aug. 15, 2018, 2:42 a.m. OK GNU C++11 TESTS 144 421 160768000 2900
42822936 Isrothy F Sept. 13, 2018, 8 a.m. OK GNU C++11 TESTS 144 436 90316800 2900
57739640 py_ultron F July 25, 2019, 11:03 a.m. OK GNU C++11 TESTS 144 451 73932800 2900
42816583 Onozuka F Sept. 13, 2018, 2:14 a.m. OK GNU C++11 TESTS 144 483 73420800 2900
42851202 Taizong F Sept. 14, 2018, 5:48 a.m. OK GNU C++14 TESTS 144 421 71680000 2900
42828420 Solashiro F Sept. 13, 2018, 11:42 a.m. OK GNU C++14 TESTS 144 436 100044800 2900
38314331 Never_See F May 16, 2018, 8:39 a.m. OK GNU C++14 TESTS 144 795 88268800 2900
42847726 KanaD F Sept. 14, 2018, 2:12 a.m. OK GNU C++14 TESTS 144 826 86220800 2900
38634631 wcz112 F May 26, 2018, 1:21 p.m. OK GNU C++14 TESTS 144 826 147046400 2900
38051912 mama_budra F May 8, 2018, 6:40 p.m. OK GNU C++14 TESTS 144 857 84992000 2900
42271143 MAMBA F Aug. 30, 2018, 8:31 a.m. OK GNU C++14 TESTS 144 873 117964800 2900
42273879 MAMBA F Aug. 30, 2018, 10:02 a.m. OK GNU C++14 TESTS 144 904 115507200 2900
38200252 Shamurah F May 13, 2018, 7:57 p.m. OK GNU C++14 TESTS 144 951 105369600 2900
38195887 Jester F May 13, 2018, 3:57 p.m. OK GNU C++14 TESTS 144 951 105369600 2900
40486695 zhysora F July 17, 2018, 5:08 p.m. OK GNU C++17 TESTS 144 701 80793600 2900
42272968 MAMBA F Aug. 30, 2018, 9:31 a.m. OK GNU C++17 TESTS 144 826 119500800 2900
40244814 mHuman F July 12, 2018, 11:03 p.m. OK GNU C++17 TESTS 144 982 91238400 2900
38198552 faggot_v2 F May 13, 2018, 6:09 p.m. OK GNU C++17 TESTS 144 982 105369600 2900
38216053 Ivan_VAVKO F May 14, 2018, 2:05 p.m. OK GNU C++17 TESTS 144 1013 142540800 2900
38153500 Georgia_001 F May 13, 2018, 6:22 a.m. OK GNU C++17 TESTS 144 1013 142540800 2900
38153352 Georgia_001 F May 13, 2018, 6:13 a.m. OK GNU C++17 TESTS 144 1076 74752000 2900
40605064 LaoZei F July 21, 2018, 10:53 a.m. OK GNU C++17 TESTS 144 1091 118886400 2900
41666858 cjnwq F Aug. 17, 2018, 12:40 a.m. OK GNU C++17 TESTS 144 1138 94515200 2900
41666336 cjnwq F Aug. 16, 2018, 11:59 p.m. OK GNU C++17 TESTS 144 1138 94515200 2900
38549848 donli F May 23, 2018, 2:59 a.m. OK Java 8 TESTS 144 2199 167424000 2900

remove filters

Back to search problems