Codeforces Round 529 (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
1095 Codeforces Round 529 (Div. 3) FINISHED False 7200 191604324 Dec. 27, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6436 ) F Make It Connected PROGRAMMING ds graphs greedy 2000

B"You are given an undirected graph consisting of n vertices. A number is written on each vertex; the number on vertex i is a_i . Initially there are no edges in the graph. You may add some edges to this graph, but you have to pay for them. The cost of adding an edge between vertices x and y is a_x + a_y coins. There are also m special offers, each of them is denoted by three numbers x , y and w , and means that you can add an edge connecting vertices x and y and pay w coins for it. You don't have to use special offers: if there is a pair of vertices x and y that has a special offer associated with it, you still may connect these two vertices paying a_x + a_y coins for it. What is the minimum number of coins you have to spend to make the graph connected? Recall that a graph is connected if it's possible to get from any vertex to any other vertex using only the edges belonging to this graph. The first line contains two integers n and m ( 1 <= n <= 2 cdot 10^5 , 0 <= m <= 2 cdot 10^5 ) -- the number of vertices in the graph and the number of special offers, respectively. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^{12} ) -- the numbers written on the vertices. Then m lines follow, each containing three integers x , y and w ( 1 <= x, y <= n , 1 <= w <= 10^{12} , x ne y ) denoting a special offer: you may add an edge connecting vertex x and vertex y , and this edge will cost w coins. Print one integer -- the minimum number of coins you have to pay to make the graph connected. In the first example it is possible to connect 1 to 2 using special offer 2 , and then 1 to 3 without using any offers. In next two examples the optimal answer may be achieved without using special offers. "...

Tutorials

Codeforces Round #529 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
48411956 ZhouTi F Jan. 15, 2019, 8:16 a.m. OK Clang++17 Diagnostics TESTS 51 1310 25292800 2000
47786942 fluffyowl F Dec. 31, 2018, 11:13 a.m. OK D TESTS 51 919 63078400 2000
54820146 Denor F May 30, 2019, 1:35 a.m. OK Delphi TESTS 51 390 45158400 2000
57495371 sansen F July 22, 2019, 8:22 a.m. OK GNU C11 TESTS 51 186 14438400 2000
54570418 rainboy F May 24, 2019, 6:57 p.m. OK GNU C11 TESTS 51 280 8806400 2000
47871169 Bramble F Jan. 3, 2019, 12:57 p.m. OK GNU C11 TESTS 51 280 13107200 2000
47673106 sky48 F Dec. 29, 2018, 7:23 a.m. OK GNU C++11 TESTS 51 93 6451200 2000
67872241 luogu_bot3 F Dec. 29, 2019, 11:56 a.m. OK GNU C++11 TESTS 51 93 7987200 2000
67872263 luogu_bot1 F Dec. 29, 2019, 11:57 a.m. OK GNU C++11 TESTS 51 93 7987200 2000
57986473 Qihoo360 F July 30, 2019, 11:35 a.m. OK GNU C++11 TESTS 51 93 8601600 2000
60776349 shixiangyu F Sept. 18, 2019, 2:31 p.m. OK GNU C++11 TESTS 51 93 9011200 2000
47620396 qqvq F Dec. 28, 2018, 12:32 p.m. OK GNU C++11 TESTS 51 93 9011200 2000
60724973 shixiangyu F Sept. 17, 2019, 1:34 p.m. OK GNU C++11 TESTS 51 93 9216000 2000
60724485 shixiangyu F Sept. 17, 2019, 1:25 p.m. OK GNU C++11 TESTS 51 93 9216000 2000
47620094 qqvq F Dec. 28, 2018, 12:24 p.m. OK GNU C++11 TESTS 51 93 10444800 2000
55529913 chenyewei_1234 F June 13, 2019, 1:03 p.m. OK GNU C++11 TESTS 51 93 10956800 2000
48780195 tokitsukaze F Jan. 23, 2019, 6:29 a.m. OK GNU C++14 TESTS 51 108 15155200 2000
68054034 Lezedary_sandwich F Jan. 1, 2020, 8:46 p.m. OK GNU C++14 TESTS 51 124 17510400 2000
56006697 threepebbles F June 24, 2019, 3:55 p.m. OK GNU C++14 TESTS 51 187 10444800 2000
47671448 1726tgyeuva F Dec. 29, 2018, 6:18 a.m. OK GNU C++14 TESTS 51 202 8806400 2000
63556623 Mynesis F Oct. 27, 2019, 1:04 p.m. OK GNU C++14 TESTS 51 218 16691200 2000
47685404 buerdepepeqi F Dec. 29, 2018, 2:32 p.m. OK GNU C++14 TESTS 51 218 22835200 2000
49660672 jonathansilver F Feb. 9, 2019, 12:15 p.m. OK GNU C++14 TESTS 51 233 8806400 2000
58892447 HouZAJ F Aug. 16, 2019, 6:14 a.m. OK GNU C++14 TESTS 51 233 11264000 2000
47773487 krijgertje F Dec. 31, 2018, 12:59 a.m. OK GNU C++14 TESTS 51 233 12800000 2000
47890948 wclee2265 F Jan. 4, 2019, 6:28 a.m. OK GNU C++14 TESTS 51 233 14848000 2000
47867182 5120160705 F Jan. 3, 2019, 10:32 a.m. OK GNU C++17 TESTS 51 217 36352000 2000
56811163 johnson F July 10, 2019, 4:12 p.m. OK GNU C++17 TESTS 51 218 6451200 2000
47658932 00YoYYYYoYYoYYYYoY00 F Dec. 28, 2018, 5:55 p.m. OK GNU C++17 TESTS 51 218 15052800 2000
49525342 fffeyn F Feb. 6, 2019, 11 a.m. OK GNU C++17 TESTS 51 234 15462400 2000
47956360 henrybear327 F Jan. 5, 2019, 6:25 a.m. OK GNU C++17 TESTS 51 248 10649600 2000
53000723 cwhao F April 19, 2019, 6:57 a.m. OK GNU C++17 TESTS 51 249 7782400 2000
47956382 henrybear327 F Jan. 5, 2019, 6:26 a.m. OK GNU C++17 TESTS 51 249 10649600 2000
47704036 Phoenix1369 F Dec. 29, 2018, 6:49 p.m. OK GNU C++17 TESTS 51 249 11161600 2000
48103447 wassim.omais F Jan. 9, 2019, 12:45 a.m. OK GNU C++17 TESTS 51 249 14540800 2000
48667181 tataky F Jan. 21, 2019, 8:43 a.m. OK GNU C++17 TESTS 51 249 15257600 2000
60308407 WangJialei F Sept. 9, 2019, 2:49 p.m. OK Go TESTS 51 764 64409600 2000
60308452 vjudge3 F Sept. 9, 2019, 2:50 p.m. OK Go TESTS 51 780 64409600 2000
63211503 vaibhav28 F Oct. 23, 2019, 4:06 a.m. OK Java 8 TESTS 51 343 16486400 2000
47830281 In_The_Name_Of_Love F Jan. 2, 2019, 6:01 a.m. OK Java 8 TESTS 51 389 17920000 2000
64869534 yaoct F Nov. 14, 2019, 7:38 a.m. OK Java 8 TESTS 51 405 14745600 2000
47622251 Codeforce_123 F Dec. 28, 2018, 1:22 p.m. OK Java 8 TESTS 51 405 17920000 2000
53289306 aman28rwt F April 25, 2019, 3:03 p.m. OK Java 8 TESTS 51 405 21708800 2000
47820224 dyhu083 F Jan. 1, 2019, 5:09 p.m. OK Java 8 TESTS 51 420 19763200 2000
53289131 aman28rwt F April 25, 2019, 3 p.m. OK Java 8 TESTS 51 436 21708800 2000
47662611 ShowStopper728 F Dec. 28, 2018, 8:06 p.m. OK Java 8 TESTS 51 451 16076800 2000
53289447 aman28rwt F April 25, 2019, 3:06 p.m. OK Java 8 TESTS 51 467 18227200 2000
54725456 KharYusuf F May 27, 2019, 8:07 p.m. OK Java 8 TESTS 51 467 23040000 2000
47857409 spookywooky F Jan. 3, 2019, 1:01 a.m. OK Kotlin TESTS 51 1575 32051200 2000
65235876 hibatibati F Nov. 17, 2019, 7:11 a.m. OK Mono C# TESTS 51 592 45363200 2000
52619211 Mosyagin F April 11, 2019, 8:18 p.m. OK Mono C# TESTS 51 655 39321600 2000
55920775 vjudge3 F June 22, 2019, 7:21 a.m. OK MS C++ TESTS 51 171 17305600 2000
52819418 vjudge4 F April 16, 2019, 11:15 a.m. OK MS C++ TESTS 51 202 15360000 2000
52486856 vjudge2 F April 8, 2019, 9:29 a.m. OK MS C++ TESTS 51 202 26112000 2000
68154507 vjudge1 F Jan. 4, 2020, 8:24 a.m. OK MS C++ TESTS 51 217 11673600 2000
55918107 vjudge1 F June 22, 2019, 6:23 a.m. OK MS C++ TESTS 51 217 14028800 2000
66669200 vjudge2 F Dec. 12, 2019, 8:32 a.m. OK MS C++ TESTS 51 217 56115200 2000
66777941 vjudge4 F Dec. 13, 2019, 10:51 a.m. OK MS C++ TESTS 51 218 9011200 2000
66662768 vjudge3 F Dec. 12, 2019, 5:32 a.m. OK MS C++ TESTS 51 218 10956800 2000
48405292 vjudge1 F Jan. 15, 2019, 2:56 a.m. OK MS C++ TESTS 51 218 11264000 2000
47719531 hbase F Dec. 30, 2018, 10:19 a.m. OK MS C++ TESTS 51 218 30822400 2000
66648268 vjudge2 F Dec. 11, 2019, 5:45 p.m. OK MS C++ 2017 TESTS 51 280 17305600 2000
68150653 vjudge4 F Jan. 4, 2020, 6:45 a.m. OK MS C++ 2017 TESTS 51 296 8806400 2000
66644159 vjudge2 F Dec. 11, 2019, 4 p.m. OK MS C++ 2017 TESTS 51 343 57036800 2000
56160657 petko_mitkov F June 27, 2019, 12:11 p.m. OK MS C++ 2017 TESTS 51 421 25088000 2000
57512529 pmitkov F July 22, 2019, 2:24 p.m. OK MS C++ 2017 TESTS 51 561 34508800 2000
66648435 vjudge1 F Dec. 11, 2019, 5:49 p.m. OK MS C++ 2017 TESTS 51 701 133529600 2000
58231878 yorky F Aug. 3, 2019, 5:15 p.m. OK MS C++ 2017 TESTS 51 763 16076800 2000
66781375 vjudge4 F Dec. 13, 2019, 12:08 p.m. OK MS C++ 2017 TESTS 51 811 10956800 2000
52680654 Kucha F April 13, 2019, 12:13 p.m. OK MS C++ 2017 TESTS 51 826 22323200 2000
52672123 AleksanderBalobanov F April 13, 2019, 8 a.m. OK MS C++ 2017 TESTS 51 873 27852800 2000
58521185 wolffd F Aug. 10, 2019, 4:46 a.m. OK PyPy 2 TESTS 51 1434 75468800 2000
58522573 wolffd F Aug. 10, 2019, 5:40 a.m. OK PyPy 2 TESTS 51 1544 79564800 2000
58521290 wolffd F Aug. 10, 2019, 4:50 a.m. OK PyPy 2 TESTS 51 1544 79769600 2000
47702762 c1729 F Dec. 29, 2018, 5:53 p.m. OK PyPy 2 TESTS 51 1559 78336000 2000
47702592 c1729 F Dec. 29, 2018, 5:45 p.m. OK PyPy 2 TESTS 51 1622 79155200 2000
50702851 gatsko F March 3, 2019, 12:08 a.m. OK PyPy 2 TESTS 51 1700 79257600 2000
50702993 gatsko F March 3, 2019, 12:23 a.m. OK PyPy 2 TESTS 51 1824 79155200 2000
58521253 wolffd F Aug. 10, 2019, 4:49 a.m. OK PyPy 2 TESTS 51 1996 73932800 2000
47776065 tiantian5 F Dec. 31, 2018, 3:58 a.m. OK PyPy 3 TESTS 51 1996 99737600 2000
47956232 whatshisbucket F Jan. 5, 2019, 6:20 a.m. OK Python 2 TESTS 51 1950 49664000 2000
49809171 idgaf F Feb. 11, 2019, 10:16 p.m. OK Python 2 TESTS 51 1980 59494400 2000
47702848 c1729 F Dec. 29, 2018, 5:56 p.m. OK Python 3 TESTS 51 1403 85196800 2000
47702803 c1729 F Dec. 29, 2018, 5:55 p.m. OK Python 3 TESTS 51 1590 84992000 2000
47685019 Megatvini F Dec. 29, 2018, 2:18 p.m. OK Python 3 TESTS 51 1933 54784000 2000
47684917 Megatvini F Dec. 29, 2018, 2:14 p.m. OK Python 3 TESTS 51 1950 50995200 2000
47616693 meooow F Dec. 28, 2018, 10:50 a.m. OK Python 3 TESTS 51 1950 65536000 2000
58103645 sansen F Aug. 1, 2019, 2:45 a.m. OK Rust TESTS 51 140 21196800 2000
60925155 mjf F Sept. 20, 2019, 12:02 p.m. OK Rust TESTS 51 296 22118400 2000

remove filters

Back to search problems