Codeforces Round 535 (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
1108 Codeforces Round 535 (Div. 3) FINISHED False 7200 183569099 Jan. 23, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2965 ) F MST Unification PROGRAMMING binary search ds graphs greedy 2300

B"You are given an undirected weighted connected graph with n vertices and m edges without loops and multiple edges. The i -th edge is e_i = (u_i, v_i, w_i) ; the distance between vertices u_i and v_i along the edge e_i is w_i ( 1 <= w_i ). The graph is connected, i. xe2 x80 x89e. for any pair of vertices, there is at least one path between them consisting only of edges of the given graph. A minimum spanning tree (MST) in case of positive weights is a subset of the edges of a connected weighted undirected graph that connects all the vertices together and has minimum total cost among all such subsets (total cost is the sum of costs of chosen edges). You can modify the given graph. The only operation you can perform is the following: increase the weight of some edge by 1 . You can increase the weight of each edge multiple (possibly, zero) times. Suppose that the initial MST cost is k . Your problem is to increase weights of some edges with minimum possible number of operations in such a way that the cost of MST in the obtained graph remains k , but MST is unique (it means that there is only one way to choose MST in the obtained graph). Your problem is to calculate the minimum number of operations required to do it. The first line of the input contains two integers n and m ( 1 <= n <= 2 cdot 10^5, n - 1 <= m <= 2 cdot 10^5 ) -- the number of vertices and the number of edges in the initial graph. The next m lines contain three integers each. The i -th line contains the description of the i -th edge e_i . It is denoted by three integers u_i, v_i and w_i ( 1 <= u_i, v_i <= n, u_i ne v_i, 1 <= w <= 10^9 ), where u_i and v_i are vertices connected by the i -th edge and w_i is the weight of this edge. It is guaranteed that the given graph doesn't contain loops and multiple edges (i.e. for each i from 1 to m "...

Tutorials

64751

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50704047 vjudge4 F March 3, 2019, 2 a.m. OK Clang++17 Diagnostics TESTS 52 483 28160000 2300
49209281 arunjyothi F Jan. 30, 2019, 2:59 p.m. OK Clang++17 Diagnostics TESTS 52 779 28467200 2300
49050622 AHTOH._. F Jan. 27, 2019, 10:54 a.m. OK FPC TESTS 52 171 5632000 2300
49050474 AHTOH._. F Jan. 27, 2019, 10:49 a.m. OK FPC TESTS 52 202 4812800 2300
49200385 s0199988819 F Jan. 30, 2019, 12:13 p.m. OK GNU C11 TESTS 52 124 4300800 2300
57478291 vjudge2 F July 22, 2019, 12:37 a.m. OK GNU C++11 TESTS 52 46 3276800 2300
48919722 newbiechdboom0 F Jan. 25, 2019, 7:11 a.m. OK GNU C++11 TESTS 52 46 3993600 2300
55209696 Umi F June 6, 2019, 2:06 p.m. OK GNU C++11 TESTS 52 61 3174400 2300
49695161 remoon F Feb. 10, 2019, 1:23 p.m. OK GNU C++11 TESTS 52 61 5632000 2300
49083890 keke_haha F Jan. 28, 2019, 6:55 a.m. OK GNU C++11 TESTS 52 62 3174400 2300
54483823 Xu_Zhiyuan F May 22, 2019, 12:12 p.m. OK GNU C++11 TESTS 52 62 3891200 2300
48919743 newbiechdboom0 F Jan. 25, 2019, 7:12 a.m. OK GNU C++11 TESTS 52 62 3993600 2300
61272900 luogu_bot4 F Sept. 25, 2019, 2:33 p.m. OK GNU C++11 TESTS 52 62 4096000 2300
51958452 AlphaWA F March 29, 2019, 5:05 a.m. OK GNU C++11 TESTS 52 62 4096000 2300
63962013 lx_zjk F Nov. 1, 2019, 5:39 a.m. OK GNU C++11 TESTS 52 62 4096000 2300
49523641 interestingLSY F Feb. 6, 2019, 9:52 a.m. OK GNU C++14 TESTS 52 61 7065600 2300
49524042 gayathriamulya98 F Feb. 6, 2019, 10:09 a.m. OK GNU C++14 TESTS 52 62 6860800 2300
49523674 HatsuneMikuo F Feb. 6, 2019, 9:53 a.m. OK GNU C++14 TESTS 52 62 7168000 2300
59261527 tingyu F Aug. 22, 2019, 8:49 a.m. OK GNU C++14 TESTS 52 109 5324800 2300
50735486 evenharder F March 3, 2019, 12:44 p.m. OK GNU C++14 TESTS 52 124 7987200 2300
55937416 threepebbles F June 22, 2019, 2:39 p.m. OK GNU C++14 TESTS 52 124 8806400 2300
55936398 threepebbles F June 22, 2019, 2:12 p.m. OK GNU C++14 TESTS 52 139 8806400 2300
49073144 krijgertje F Jan. 27, 2019, 11:09 p.m. OK GNU C++14 TESTS 52 140 3993600 2300
67977381 Gankutsuou F Dec. 30, 2019, 5:30 p.m. OK GNU C++14 TESTS 52 140 4812800 2300
49115856 JasonWhyBoune F Jan. 28, 2019, 4:55 p.m. OK GNU C++14 TESTS 52 140 5120000 2300
58125970 vjudge5 F Aug. 1, 2019, 12:37 p.m. OK GNU C++17 TESTS 52 124 5324800 2300
50877068 648771054 F March 6, 2019, 6:55 a.m. OK GNU C++17 TESTS 52 124 5324800 2300
49889190 mohamedeltair F Feb. 14, 2019, 1:39 a.m. OK GNU C++17 TESTS 52 124 6451200 2300
49907694 gaelim F Feb. 14, 2019, 12:46 p.m. OK GNU C++17 TESTS 52 124 7168000 2300
49905900 gaelim F Feb. 14, 2019, 11:56 a.m. OK GNU C++17 TESTS 52 124 7168000 2300
52435410 Zhangben F April 7, 2019, 3:01 a.m. OK GNU C++17 TESTS 52 140 3276800 2300
58077935 vjudge3 F July 31, 2019, 12:59 p.m. OK GNU C++17 TESTS 52 140 3276800 2300
52771629 Lanceloia F April 15, 2019, 9:12 a.m. OK GNU C++17 TESTS 52 140 3276800 2300
51169359 compute F March 11, 2019, 3:41 p.m. OK GNU C++17 TESTS 52 140 3276800 2300
48909898 MonogatariKoi F Jan. 25, 2019, 1:11 a.m. OK GNU C++17 TESTS 52 140 3481600 2300
49242676 Meternal F Jan. 31, 2019, 11:07 a.m. OK Go TESTS 52 452 14131200 2300
49085623 2008061626 F Jan. 28, 2019, 7:22 a.m. OK Go TESTS 52 546 14131200 2300
49423499 tsumit023 F Feb. 3, 2019, 4:40 p.m. OK Java 8 TESTS 52 218 0 2300
49046754 revanthreddy85 F Jan. 27, 2019, 9:10 a.m. OK Java 8 TESTS 52 233 4096000 2300
55908674 caoash F June 21, 2019, 11:10 p.m. OK Java 8 TESTS 52 249 3072000 2300
58191125 Omar_Tarek F Aug. 2, 2019, 7:42 p.m. OK Java 8 TESTS 52 296 5120000 2300
52214200 SpargelTarzan F April 1, 2019, 10:59 p.m. OK Java 8 TESTS 52 311 4915200 2300
49177908 YahiaBadr F Jan. 29, 2019, 10:14 p.m. OK Java 8 TESTS 52 327 5017600 2300
49388243 bhautik_77 F Feb. 3, 2019, 8:13 a.m. OK Java 8 TESTS 52 327 29491200 2300
64339705 Agnimandur F Nov. 6, 2019, 1:30 a.m. OK Java 8 TESTS 52 342 4096000 2300
49093671 vivekiitian F Jan. 28, 2019, 9:15 a.m. OK Java 8 TESTS 52 342 6451200 2300
49180730 MDSP F Jan. 30, 2019, 1:25 a.m. OK Java 8 TESTS 52 343 921600 2300
51050999 Mosyagin F March 8, 2019, 9:07 p.m. OK Mono C# TESTS 52 608 77619200 2300
63012720 vjudge2 F Oct. 20, 2019, 12:06 p.m. OK MS C++ TESTS 52 124 3174400 2300
49501491 vjudge4 F Feb. 5, 2019, 3:25 p.m. OK MS C++ TESTS 52 124 3993600 2300
68158637 vjudge5 F Jan. 4, 2020, 9:56 a.m. OK MS C++ TESTS 52 124 5632000 2300
62928186 vjudge4 F Oct. 19, 2019, 11:56 a.m. OK MS C++ TESTS 52 124 5632000 2300
58110345 vjudge3 F Aug. 1, 2019, 6:50 a.m. OK MS C++ TESTS 52 124 5632000 2300
58100555 vjudge2 F Aug. 1, 2019, 12:25 a.m. OK MS C++ TESTS 52 124 5632000 2300
68163156 vjudge2 F Jan. 4, 2020, 11:45 a.m. OK MS C++ TESTS 52 124 5632000 2300
53012279 vjudge2 F April 19, 2019, 12:39 p.m. OK MS C++ TESTS 52 124 6451200 2300
58157449 vjudge5 F Aug. 2, 2019, 6:14 a.m. OK MS C++ TESTS 52 124 7168000 2300
68152444 vjudge1 F Jan. 4, 2020, 7:28 a.m. OK MS C++ TESTS 52 124 7577600 2300
53427166 zzq233 F April 27, 2019, 2:14 p.m. OK MS C++ 2017 TESTS 52 171 5632000 2300
69707846 vjudge1 F Jan. 29, 2020, 5:37 a.m. OK MS C++ 2017 TESTS 52 514 90009600 2300
62873074 vjudge5 F Oct. 18, 2019, 2:24 p.m. OK MS C++ 2017 TESTS 52 546 5632000 2300
50517665 tangbinjie F Feb. 26, 2019, 7:34 a.m. OK MS C++ 2017 TESTS 52 670 15360000 2300
58224274 yorky F Aug. 3, 2019, 1:48 p.m. OK MS C++ 2017 TESTS 52 779 89600000 2300
48917275 PavelChadnov F Jan. 25, 2019, 6:04 a.m. OK MS C++ 2017 TESTS 52 967 100556800 2300
49028880 W_Szymanski F Jan. 26, 2019, 8:37 p.m. OK Ocaml TESTS 52 249 7680000 2300
48906403 titia F Jan. 24, 2019, 8:45 p.m. OK PyPy 3 TESTS 52 1107 32256000 2300
66141463 at1 F Dec. 1, 2019, 2:36 p.m. OK PyPy 3 TESTS 52 1123 32870400 2300
48991306 Regius F Jan. 26, 2019, 2:32 p.m. OK PyPy 3 TESTS 52 2308 33177600 2300
49812315 vjudge3 F Feb. 12, 2019, 2:25 a.m. OK Python 2 TESTS 52 1575 24166400 2300
49813241 vjudge4 F Feb. 12, 2019, 3:23 a.m. OK Python 2 TESTS 52 1591 24166400 2300
49812394 vjudge4 F Feb. 12, 2019, 2:31 a.m. OK Python 2 TESTS 52 1637 24166400 2300
49813121 vjudge2 F Feb. 12, 2019, 3:17 a.m. OK Python 2 TESTS 52 1715 24166400 2300
49342443 RULO F Feb. 2, 2019, 1:28 a.m. OK Python 3 TESTS 52 1559 27238400 2300
49331855 mpujitha28 F Feb. 1, 2019, 4:37 p.m. OK Python 3 TESTS 52 1590 30412800 2300
48985375 meooow F Jan. 26, 2019, 12:05 p.m. OK Python 3 TESTS 52 1622 30412800 2300
48906412 titia F Jan. 24, 2019, 8:46 p.m. OK Python 3 TESTS 52 1871 33587200 2300
49817085 bestzx55 F Feb. 12, 2019, 6:37 a.m. OK Python 3 TESTS 52 1903 24883200 2300
49813281 vjudge4 F Feb. 12, 2019, 3:26 a.m. OK Python 3 TESTS 52 1996 24268800 2300
49815686 bestzx55 F Feb. 12, 2019, 5:44 a.m. OK Python 3 TESTS 52 2011 24883200 2300
49813315 bestzx55 F Feb. 12, 2019, 3:28 a.m. OK Python 3 TESTS 52 2167 38195200 2300
49813442 bestzx55 F Feb. 12, 2019, 3:36 a.m. OK Python 3 TESTS 52 2168 37785600 2300
59972115 sansen F Sept. 4, 2019, 2:31 a.m. OK Rust TESTS 52 77 12595200 2300
51409281 meteor F March 17, 2019, 11:21 a.m. OK Rust TESTS 52 265 7168000 2300

remove filters

Back to search problems