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.
Problems
B"You are given a connected weighted graph with n vertices and m edges. The graph doesn't contain loops nor multiple edges. Consider some edge with id i. Let's determine for this edge the maximum integer weight we can give to it so that it is contained in all minimum spanning trees of the graph if we don't change the other weights. You are to determine this maximum weight described above for each edge. You should calculate the answer for each edge independently, it means there can't be two edges with changed weights at the same time. The first line contains two integers n and m (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7105, n xe2 x80 x89- xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7105), where n and m are the number of vertices and the number of edges in the graph, respectively. Each of the next m lines contains three integers u, v and c (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89v, xe2 x80 x89u xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, v xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89u, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89c xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) meaning that there is an edge between vertices u and v with weight c. Print the answer for each edge in the order the edges are given in the input. If an edge is contained in every minimum spanning tree with any weight, print -1 as the answer. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
30445539 |
toida12chu |
D |
Sept. 17, 2017, 3:33 p.m. |
OK |
FPC |
TESTS |
102 |
686 |
96563200 |
|
2700 |
32041559 |
vjudge1 |
D |
Nov. 4, 2017, 3:43 a.m. |
OK |
GNU C++ |
TESTS |
102 |
171 |
50585600 |
|
2700 |
32041632 |
vjudge2 |
D |
Nov. 4, 2017, 3:49 a.m. |
OK |
GNU C++ |
TESTS |
102 |
186 |
47411200 |
|
2700 |
29916182 |
vjudge4 |
D |
Aug. 30, 2017, 11:46 a.m. |
OK |
GNU C++ |
TESTS |
102 |
186 |
94822400 |
|
2700 |
30547496 |
Magolor |
D |
Sept. 20, 2017, 1:48 p.m. |
OK |
GNU C++ |
TESTS |
102 |
187 |
62668800 |
|
2700 |
30547443 |
vjudge2 |
D |
Sept. 20, 2017, 1:47 p.m. |
OK |
GNU C++ |
TESTS |
102 |
187 |
62668800 |
|
2700 |
29916214 |
vjudge1 |
D |
Aug. 30, 2017, 11:48 a.m. |
OK |
GNU C++ |
TESTS |
102 |
202 |
50585600 |
|
2700 |
30547368 |
Magolor |
D |
Sept. 20, 2017, 1:44 p.m. |
OK |
GNU C++ |
TESTS |
102 |
202 |
62668800 |
|
2700 |
32041892 |
hhhwsqhhh |
D |
Nov. 4, 2017, 4:08 a.m. |
OK |
GNU C++ |
TESTS |
102 |
217 |
33587200 |
|
2700 |
29916508 |
vjudge1 |
D |
Aug. 30, 2017, 12:01 p.m. |
OK |
GNU C++ |
TESTS |
102 |
218 |
155955200 |
|
2700 |
29916505 |
vjudge4 |
D |
Aug. 30, 2017, 12:01 p.m. |
OK |
GNU C++ |
TESTS |
102 |
234 |
75776000 |
|
2700 |
44403837 |
sunshiness |
D |
Oct. 16, 2018, 2:01 p.m. |
OK |
GNU C++11 |
TESTS |
102 |
156 |
49459200 |
|
2700 |
65441990 |
saitoasuka |
D |
Nov. 20, 2019, 2:38 p.m. |
OK |
GNU C++11 |
TESTS |
102 |
171 |
49152000 |
|
2700 |
57826242 |
Dilute |
D |
July 27, 2019, 3:17 a.m. |
OK |
GNU C++11 |
TESTS |
102 |
171 |
60211200 |
|
2700 |
45030177 |
shuashuawan |
D |
Oct. 29, 2018, 3:05 a.m. |
OK |
GNU C++11 |
TESTS |
102 |
171 |
80281600 |
|
2700 |
45030157 |
luogu_bot4 |
D |
Oct. 29, 2018, 3:04 a.m. |
OK |
GNU C++11 |
TESTS |
102 |
171 |
80281600 |
|
2700 |
28474212 |
rqgao2014 |
D |
July 12, 2017, 12:49 p.m. |
OK |
GNU C++11 |
TESTS |
102 |
186 |
93900800 |
|
2700 |
28474186 |
rqgao2014 |
D |
July 12, 2017, 12:48 p.m. |
OK |
GNU C++11 |
TESTS |
102 |
187 |
95846400 |
|
2700 |
28467210 |
liaoliao |
D |
July 12, 2017, 8:15 a.m. |
OK |
GNU C++11 |
TESTS |
102 |
202 |
21299200 |
|
2700 |
44673954 |
luogu_bot5 |
D |
Oct. 22, 2018, 1:14 a.m. |
OK |
GNU C++11 |
TESTS |
102 |
202 |
30310400 |
|
2700 |
40980546 |
ReaLNero1 |
D |
July 30, 2018, 5:34 p.m. |
OK |
GNU C++11 |
TESTS |
102 |
202 |
50585600 |
|
2700 |
45998812 |
Xin-Jie |
D |
Nov. 20, 2018, 1:33 p.m. |
OK |
GNU C++14 |
TESTS |
102 |
233 |
51200000 |
|
2700 |
57313236 |
no_one_qwq |
D |
July 19, 2019, 7:17 a.m. |
OK |
GNU C++14 |
TESTS |
102 |
234 |
57548800 |
|
2700 |
29600791 |
Hank2006 |
D |
Aug. 19, 2017, 2:25 p.m. |
OK |
GNU C++14 |
TESTS |
102 |
265 |
55398400 |
|
2700 |
32041478 |
ywsama |
D |
Nov. 4, 2017, 3:36 a.m. |
OK |
GNU C++14 |
TESTS |
102 |
265 |
96460800 |
|
2700 |
54872989 |
NotNight |
D |
May 31, 2019, 10:19 a.m. |
OK |
GNU C++14 |
TESTS |
102 |
280 |
49152000 |
|
2700 |
54872911 |
NotNight |
D |
May 31, 2019, 10:16 a.m. |
OK |
GNU C++14 |
TESTS |
102 |
280 |
49152000 |
|
2700 |
28448655 |
la1la1la |
D |
July 11, 2017, 6:31 p.m. |
OK |
GNU C++14 |
TESTS |
102 |
295 |
57344000 |
|
2700 |
54872954 |
NotNight |
D |
May 31, 2019, 10:18 a.m. |
OK |
GNU C++14 |
TESTS |
102 |
296 |
49152000 |
|
2700 |
34211569 |
lyx_cjz |
D |
Jan. 16, 2018, 3:13 a.m. |
OK |
GNU C++14 |
TESTS |
102 |
311 |
30720000 |
|
2700 |
61535856 |
Four-leafClover |
D |
Sept. 30, 2019, 6:19 a.m. |
OK |
GNU C++14 |
TESTS |
102 |
311 |
45977600 |
|
2700 |
46741097 |
xuzihao |
D |
Dec. 8, 2018, 2:35 a.m. |
OK |
GNU C++17 |
TESTS |
102 |
233 |
56012800 |
|
2700 |
remove filters
Back to search problems