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'We had a really tough time generating tests for problem D. In order to prepare strong tests, we had to solve the following problem. Given an undirected labeled tree consisting of n vertices, find a set of segments such that: Can you solve this problem too? The first line contains one integer n ( 1 <= n <= 5 cdot 10^5 ) -- the number of vertices in the tree. Then n - 1 lines follow, each containing two integers x_i and y_i ( 1 <= x_i, y_i <= n , x_i ne y_i ) denoting the endpoints of the i -th edge. It is guaranteed that the given graph is a tree. Print n pairs of integers, the i -th pair should contain two integers l_i and r_i ( 1 <= l_i < r_i <= 2n ) -- the endpoints of the i -th segment. All 2n integers you print should be unique. It is guaranteed that the answer always exists. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
67257896 |
AyoAyowei |
E |
Dec. 20, 2019, 12:35 a.m. |
OK |
GNU C++11 |
TESTS |
66 |
264 |
37376000 |
|
2200 |
67310288 |
AyoAyowei |
E |
Dec. 21, 2019, 2:08 a.m. |
OK |
GNU C++11 |
TESTS |
66 |
280 |
37376000 |
|
2200 |
67299796 |
LJC00118 |
E |
Dec. 20, 2019, 6:16 p.m. |
OK |
GNU C++11 |
TESTS |
66 |
327 |
31641600 |
|
2200 |
67242407 |
lyzqs |
E |
Dec. 19, 2019, 4:34 p.m. |
OK |
GNU C++11 |
TESTS |
66 |
343 |
22528000 |
|
2200 |
67854417 |
lyzqs |
E |
Dec. 29, 2019, 5:23 a.m. |
OK |
GNU C++11 |
TESTS |
66 |
358 |
22528000 |
|
2200 |
67521559 |
vjudge1 |
E |
Dec. 24, 2019, 12:36 p.m. |
OK |
GNU C++11 |
TESTS |
66 |
390 |
19763200 |
|
2200 |
68707444 |
x_Yi_x |
E |
Jan. 13, 2020, 11:50 a.m. |
OK |
GNU C++11 |
TESTS |
66 |
404 |
33382400 |
|
2200 |
67248514 |
JingLuozz |
E |
Dec. 19, 2019, 6:06 p.m. |
OK |
GNU C++11 |
TESTS |
66 |
405 |
45158400 |
|
2200 |
67258641 |
4790iop |
E |
Dec. 20, 2019, 1:24 a.m. |
OK |
GNU C++11 |
TESTS |
66 |
420 |
30105600 |
|
2200 |
68401740 |
1470519347 |
E |
Jan. 8, 2020, 1:25 p.m. |
OK |
GNU C++11 |
TESTS |
66 |
420 |
33177600 |
|
2200 |
67281481 |
_XXXTENTACION |
E |
Dec. 20, 2019, 1:11 p.m. |
OK |
GNU C++14 |
TESTS |
66 |
467 |
53452800 |
|
2200 |
67232624 |
rainboy |
E |
Dec. 19, 2019, 3:52 p.m. |
OK |
GNU C++14 |
TESTS |
66 |
561 |
41164800 |
|
2200 |
67276474 |
KisekiPurin2019 |
E |
Dec. 20, 2019, 10:24 a.m. |
OK |
GNU C++14 |
TESTS |
66 |
561 |
41574400 |
|
2200 |
67609885 |
Lezedary_sandwich |
E |
Dec. 25, 2019, 2:59 p.m. |
OK |
GNU C++14 |
TESTS |
66 |
561 |
53043200 |
|
2200 |
67319001 |
ybtcl |
E |
Dec. 21, 2019, 7:16 a.m. |
OK |
GNU C++14 |
TESTS |
66 |
576 |
41369600 |
|
2200 |
67301367 |
nafis_shifat |
E |
Dec. 20, 2019, 6:52 p.m. |
OK |
GNU C++14 |
TESTS |
66 |
576 |
41369600 |
|
2200 |
67488331 |
tanmay2625 |
E |
Dec. 23, 2019, 6:20 p.m. |
OK |
GNU C++14 |
TESTS |
66 |
577 |
25907200 |
|
2200 |
67678088 |
elManco |
E |
Dec. 27, 2019, 4:19 a.m. |
OK |
GNU C++14 |
TESTS |
66 |
577 |
35635200 |
|
2200 |
67309957 |
JoseSoto |
E |
Dec. 21, 2019, 1:46 a.m. |
OK |
GNU C++14 |
TESTS |
66 |
577 |
35635200 |
|
2200 |
67302957 |
shehebe |
E |
Dec. 20, 2019, 7:34 p.m. |
OK |
GNU C++14 |
TESTS |
66 |
577 |
35840000 |
|
2200 |
67257852 |
dmkozyrev |
E |
Dec. 20, 2019, 12:32 a.m. |
OK |
GNU C++17 |
TESTS |
66 |
405 |
43520000 |
|
2200 |
67257856 |
dmkozyrev |
E |
Dec. 20, 2019, 12:33 a.m. |
OK |
GNU C++17 |
TESTS |
66 |
436 |
29388800 |
|
2200 |
67281558 |
Magicdog_Jo |
E |
Dec. 20, 2019, 1:12 p.m. |
OK |
GNU C++17 |
TESTS |
66 |
467 |
31436800 |
|
2200 |
67249939 |
Pccc |
E |
Dec. 19, 2019, 6:39 p.m. |
OK |
GNU C++17 |
TESTS |
66 |
467 |
83251200 |
|
2200 |
67265639 |
swust5120177231 |
E |
Dec. 20, 2019, 6:02 a.m. |
OK |
GNU C++17 |
TESTS |
66 |
483 |
37376000 |
|
2200 |
67273355 |
ZXyang |
E |
Dec. 20, 2019, 9:14 a.m. |
OK |
GNU C++17 |
TESTS |
66 |
499 |
59187200 |
|
2200 |
67302053 |
njha1999 |
E |
Dec. 20, 2019, 7:10 p.m. |
OK |
GNU C++17 |
TESTS |
66 |
514 |
46899200 |
|
2200 |
67246776 |
Sinogi |
E |
Dec. 19, 2019, 5:30 p.m. |
OK |
GNU C++17 |
TESTS |
66 |
529 |
35430400 |
|
2200 |
67240871 |
wangziji |
E |
Dec. 19, 2019, 4:29 p.m. |
OK |
GNU C++17 |
TESTS |
66 |
530 |
55193600 |
|
2200 |
67265759 |
codgician |
E |
Dec. 20, 2019, 6:05 a.m. |
OK |
GNU C++17 |
TESTS |
66 |
546 |
57139200 |
|
2200 |
67252337 |
lightseba |
E |
Dec. 19, 2019, 7:44 p.m. |
OK |
Java 11 |
TESTS |
66 |
1481 |
169472000 |
|
2200 |
67226172 |
Dukkha |
E |
Dec. 19, 2019, 3:25 p.m. |
OK |
Java 11 |
TESTS |
66 |
1544 |
36659200 |
|
2200 |
67300501 |
Anonymous |
E |
Dec. 20, 2019, 6:32 p.m. |
OK |
Java 11 |
TESTS |
66 |
1700 |
134246400 |
|
2200 |
67244701 |
Musin |
E |
Dec. 19, 2019, 4:58 p.m. |
OK |
Java 11 |
TESTS |
66 |
1996 |
243404800 |
|
2200 |
67235847 |
nikolay.v.mikhaylov |
E |
Dec. 19, 2019, 4:06 p.m. |
OK |
Java 8 |
TESTS |
66 |
873 |
108236800 |
|
2200 |
67557853 |
BaZ_ |
E |
Dec. 24, 2019, 4:58 p.m. |
OK |
Java 8 |
TESTS |
66 |
1028 |
177254400 |
|
2200 |
67275538 |
thisbeit |
E |
Dec. 20, 2019, 10:03 a.m. |
OK |
Java 8 |
TESTS |
66 |
1060 |
122982400 |
|
2200 |
68152309 |
luchy0120 |
E |
Jan. 4, 2020, 7:25 a.m. |
OK |
Java 8 |
TESTS |
66 |
1123 |
140697600 |
|
2200 |
67276288 |
spar5h |
E |
Dec. 20, 2019, 10:20 a.m. |
OK |
Java 8 |
TESTS |
66 |
1185 |
130048000 |
|
2200 |
67253371 |
prem_cse |
E |
Dec. 19, 2019, 8:17 p.m. |
OK |
Java 8 |
TESTS |
66 |
1325 |
122368000 |
|
2200 |
67266704 |
dtsarun |
E |
Dec. 20, 2019, 6:29 a.m. |
OK |
Java 8 |
TESTS |
66 |
1356 |
126054400 |
|
2200 |
67228544 |
Suzukaze |
E |
Dec. 19, 2019, 3:35 p.m. |
OK |
Java 8 |
TESTS |
66 |
1372 |
123494400 |
|
2200 |
67680257 |
norty |
E |
Dec. 27, 2019, 5:55 a.m. |
OK |
Java 8 |
TESTS |
66 |
1466 |
236032000 |
|
2200 |
67377407 |
horseprabhat625 |
E |
Dec. 21, 2019, 3:24 p.m. |
OK |
Java 8 |
TESTS |
66 |
1512 |
185651200 |
|
2200 |
67767275 |
Tlatoani |
E |
Dec. 28, 2019, 4:51 a.m. |
OK |
Kotlin |
TESTS |
66 |
1949 |
129331200 |
|
2200 |
67261572 |
camypaper |
E |
Dec. 20, 2019, 3:50 a.m. |
OK |
Mono C# |
TESTS |
66 |
1762 |
165580800 |
|
2200 |
67241395 |
r57shell |
E |
Dec. 19, 2019, 4:31 p.m. |
OK |
MS C++ |
TESTS |
66 |
623 |
31641600 |
|
2200 |
67264752 |
youx |
E |
Dec. 20, 2019, 5:36 a.m. |
OK |
MS C++ 2017 |
TESTS |
66 |
685 |
30208000 |
|
2200 |
67683586 |
hxx_ustc |
E |
Dec. 27, 2019, 7:44 a.m. |
OK |
MS C++ 2017 |
TESTS |
66 |
701 |
28569600 |
|
2200 |
67233970 |
pichulia |
E |
Dec. 19, 2019, 3:58 p.m. |
OK |
MS C++ 2017 |
TESTS |
66 |
842 |
44236800 |
|
2200 |
67255178 |
altunyanv |
E |
Dec. 19, 2019, 9:29 p.m. |
OK |
MS C++ 2017 |
TESTS |
66 |
982 |
37171200 |
|
2200 |
67281030 |
pajenegod |
E |
Dec. 20, 2019, 1:04 p.m. |
OK |
PyPy 2 |
TESTS |
66 |
1138 |
71680000 |
|
2200 |
67281334 |
pajenegod |
E |
Dec. 20, 2019, 1:08 p.m. |
OK |
PyPy 2 |
TESTS |
66 |
1138 |
71884800 |
|
2200 |
67258996 |
pajenegod |
E |
Dec. 20, 2019, 1:44 a.m. |
OK |
PyPy 2 |
TESTS |
66 |
1138 |
72601600 |
|
2200 |
67256984 |
pajenegod |
E |
Dec. 19, 2019, 11:22 p.m. |
OK |
PyPy 2 |
TESTS |
66 |
1169 |
75673600 |
|
2200 |
67256965 |
pajenegod |
E |
Dec. 19, 2019, 11:21 p.m. |
OK |
PyPy 2 |
TESTS |
66 |
1169 |
75673600 |
|
2200 |
67257387 |
pajenegod |
E |
Dec. 19, 2019, 11:53 p.m. |
OK |
PyPy 2 |
TESTS |
66 |
1169 |
77516800 |
|
2200 |
67257202 |
pajenegod |
E |
Dec. 19, 2019, 11:39 p.m. |
OK |
PyPy 2 |
TESTS |
66 |
1201 |
72601600 |
|
2200 |
67256865 |
pajenegod |
E |
Dec. 19, 2019, 11:13 p.m. |
OK |
PyPy 2 |
TESTS |
66 |
1201 |
77619200 |
|
2200 |
67257126 |
pajenegod |
E |
Dec. 19, 2019, 11:32 p.m. |
OK |
PyPy 2 |
TESTS |
66 |
1216 |
72601600 |
|
2200 |
67257053 |
pajenegod |
E |
Dec. 19, 2019, 11:26 p.m. |
OK |
PyPy 2 |
TESTS |
66 |
1216 |
75571200 |
|
2200 |
68155741 |
tamato |
E |
Jan. 4, 2020, 8:53 a.m. |
OK |
PyPy 3 |
TESTS |
66 |
1980 |
103219200 |
|
2200 |
67239216 |
yakamoto |
E |
Dec. 19, 2019, 4:22 p.m. |
OK |
Scala |
TESTS |
66 |
1060 |
49356800 |
|
2200 |
67239545 |
yakamoto |
E |
Dec. 19, 2019, 4:23 p.m. |
OK |
Scala |
TESTS |
66 |
1060 |
74035200 |
|
2200 |
remove filters
Back to search problems