Codeforces Round 111 (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
160 Codeforces Round 111 (Div. 2) FINISHED False 7200 445359623 March 6, 2012, 3 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 3337 ) D Edges in MST PROGRAMMING dfs and similar dsu graphs sortings 2500

You are given a connected weighted undirected graph without any loops and multiple edges. Let us remind you that a graph's spanning tree is defined as an acyclic connected subgraph of the given graph that includes all of the graph's vertexes. The weight of a tree is defined as the sum of weights of the edges that the given tree contains. The minimum spanning tree ( MST ) of a graph is defined as the graph's spanning tree having the minimum possible weight. For any connected graph obviously exists the minimum spanning tree, but in the general case, a graph's minimum spanning tree is not unique. Your task is to determine the following for each edge of the given graph: whether it is either included in any MST, or included at least in one MST, or not included in any MST. The first line contains two integers n and m ( 2 ≤ n ≤ 10 5 , ) — the number of the graph's vertexes and edges, correspondingly. Then follow m lines, each of them contains three integers — the description of the graph's edges as " a i b i w i " ( 1 ≤ a i , b i ≤ n , 1 ≤ w i ≤ 10 6 , a i ≠ b i ), where a i and b i are the numbers of vertexes connected by the i -th edge, w i is the edge's weight. It is guaranteed that the graph is connected and doesn't contain loops or multiple edges. Print m lines — the answers for all edges. If the i -th edge is included in any MST, print " any "; if the i -th edge is included at least in one MST, print " at least one "; if the i -th edge isn't included in any MST, print " none ". Print the answers for the edges in the order in which the edges are specified in the input. In the second sample the MST is unique for the given graph: it contains two first edges. In the third sample any two edges form the MST for the given graph. That means that each edge is included at least in one MST.

Tutorials

Codeforces Round #111 (Div. 2) Разбор Задач

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
31737785 HEXU123 D Oct. 26, 2017, 12:20 p.m. OK FPC TESTS 56 686 15462400 2500
40991740 ReaLNero1 D July 31, 2018, 12:50 a.m. OK GNU C++ TESTS 56 46 9523200 2500
40591307 GJC D July 20, 2018, 11:56 p.m. OK GNU C++ TESTS 56 46 9523200 2500
37122202 miaoxiankai D April 9, 2018, 12:54 p.m. OK GNU C++ TESTS 56 46 10137600 2500
40581188 GJC D July 20, 2018, 2:29 p.m. OK GNU C++ TESTS 56 61 9523200 2500
37790615 Hacheylight D May 1, 2018, 6:54 a.m. OK GNU C++ TESTS 56 61 10137600 2500
37894338 luogu_bot2 D May 5, 2018, 2:15 a.m. OK GNU C++ TESTS 56 61 11776000 2500
36787088 Dfkdsmbd D April 1, 2018, 3:05 a.m. OK GNU C++ TESTS 56 61 11980800 2500
38563453 nicous D May 23, 2018, 1:36 p.m. OK GNU C++ TESTS 56 62 7372800 2500
40581125 GJC D July 20, 2018, 2:26 p.m. OK GNU C++ TESTS 56 62 9523200 2500
37829815 Villard D May 2, 2018, 3:40 a.m. OK GNU C++ TESTS 56 62 11776000 2500
63357484 vjudge4 D Oct. 25, 2019, 3:36 a.m. OK GNU C++11 TESTS 56 46 8089600 2500
63357460 C20192413 D Oct. 25, 2019, 3:35 a.m. OK GNU C++11 TESTS 56 46 8192000 2500
49932033 luogu_bot4 D Feb. 15, 2019, 5:16 a.m. OK GNU C++11 TESTS 56 46 14848000 2500
68802867 vjudge3 D Jan. 14, 2020, 3:33 p.m. OK GNU C++11 TESTS 56 61 9523200 2500
56710686 luogu_bot3 D July 8, 2019, 12:39 p.m. OK GNU C++11 TESTS 56 61 46182400 2500
38574384 Gaozijian D May 24, 2018, 1:21 a.m. OK GNU C++11 TESTS 56 62 6656000 2500
40109701 yukuai26 D July 9, 2018, 10:56 a.m. OK GNU C++11 TESTS 56 62 8192000 2500
55910341 luogu_bot1 D June 22, 2019, 1:16 a.m. OK GNU C++11 TESTS 56 62 9523200 2500
53690804 5095187020216 D May 3, 2019, 4:45 a.m. OK GNU C++11 TESTS 56 62 12697600 2500
49926990 luogu_bot5 D Feb. 15, 2019, 12:04 a.m. OK GNU C++11 TESTS 56 62 14848000 2500
56548268 YJH143 D July 5, 2019, 8:34 a.m. OK GNU C++14 TESTS 56 93 7680000 2500
68860963 vjudge3 D Jan. 15, 2020, 12:05 p.m. OK GNU C++14 TESTS 56 93 8908800 2500
49905926 vjudge4 D Feb. 14, 2019, 11:57 a.m. OK GNU C++14 TESTS 56 93 8908800 2500
60919447 vjudge4 D Sept. 20, 2019, 9:54 a.m. OK GNU C++14 TESTS 56 93 9011200 2500
60919383 hello_world2005 D Sept. 20, 2019, 9:52 a.m. OK GNU C++14 TESTS 56 93 9011200 2500
49932140 vjudge5 D Feb. 15, 2019, 5:20 a.m. OK GNU C++14 TESTS 56 93 13312000 2500
49932135 sunyunqi D Feb. 15, 2019, 5:20 a.m. OK GNU C++14 TESTS 56 93 13312000 2500
67533723 vjudge2 D Dec. 24, 2019, 3 p.m. OK GNU C++14 TESTS 56 93 56115200 2500
49894923 stepsys D Feb. 14, 2019, 6:26 a.m. OK GNU C++14 TESTS 56 108 14028800 2500
40115381 APenguin D July 9, 2018, 2:19 p.m. OK GNU C++14 TESTS 56 109 6758400 2500
48891120 CaNDidaTE_FaSTer D Jan. 24, 2019, 2:05 p.m. OK GNU C++17 TESTS 56 93 7577600 2500
46023866 YJH143 D Nov. 21, 2018, 9:54 a.m. OK GNU C++17 TESTS 56 93 7680000 2500
68930576 vjudge5 D Jan. 16, 2020, 11:13 a.m. OK GNU C++17 TESTS 56 93 8499200 2500
59602694 xzt220 D Aug. 28, 2019, 7:08 a.m. OK GNU C++17 TESTS 56 93 8806400 2500
61537313 pre111 D Sept. 30, 2019, 7:05 a.m. OK GNU C++17 TESTS 56 93 10854400 2500
46960721 hyfzbtrs D Dec. 13, 2018, 7:57 a.m. OK GNU C++17 TESTS 56 93 11776000 2500
56279751 vinhags D June 29, 2019, 4:08 p.m. OK GNU C++17 TESTS 56 93 54784000 2500
49897766 qinyuyang D Feb. 14, 2019, 7:47 a.m. OK GNU C++17 TESTS 56 93 121753600 2500
48264778 gonP D Jan. 11, 2019, 7:26 p.m. OK GNU C++17 TESTS 56 108 13209600 2500
42416365 terminator D Sept. 3, 2018, 7:24 a.m. OK GNU C++17 TESTS 56 109 7475200 2500
54954685 nullptr2 D June 1, 2019, 9:36 p.m. OK Java 8 TESTS 56 342 46796800 2500
47525705 ZeyadKhattab D Dec. 26, 2018, 3:43 p.m. OK Java 8 TESTS 56 608 41369600 2500
52725361 dgupta2 D April 13, 2019, 11:31 p.m. OK Java 8 TESTS 56 623 89702400 2500
47525190 ZeyadKhattab D Dec. 26, 2018, 3:26 p.m. OK Java 8 TESTS 56 639 41369600 2500
63634381 C20193515_LYX D Oct. 28, 2019, 7:39 a.m. OK MS C++ TESTS 56 93 7884800 2500
67601677 vjudge5 D Dec. 25, 2019, 12:10 p.m. OK MS C++ TESTS 56 93 54681600 2500
67468355 vjudge2 D Dec. 23, 2019, 11:54 a.m. OK MS C++ TESTS 56 93 54681600 2500
67958354 vjudge4 D Dec. 30, 2019, 10:34 a.m. OK MS C++ TESTS 56 109 9728000 2500
67957708 vjudge3 D Dec. 30, 2019, 10:19 a.m. OK MS C++ TESTS 56 109 9728000 2500
31447243 DimonK D Oct. 17, 2017, 11:57 a.m. OK MS C++ TESTS 56 310 48128000 2500
31447580 DimonK D Oct. 17, 2017, 12:10 p.m. OK MS C++ TESTS 56 312 48128000 2500
45899020 vjudge4 D Nov. 18, 2018, 2:31 a.m. OK MS C++ TESTS 56 374 10035200 2500
34278199 Tampere D Jan. 18, 2018, 2:20 p.m. OK MS C++ TESTS 56 1152 19251200 2500
60700691 icaro D Sept. 16, 2019, 11:53 p.m. OK Python 3 TESTS 56 1637 214937600 2500

remove filters

Back to search problems