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 |
1056
|
Mail.Ru Cup 2018 Round 3 |
FINISHED |
False |
9000 |
194016263 |
Nov. 25, 2018, 4:35 p.m. |
Problems
B"You successfully found poor Arkady near the exit of the station you've perfectly predicted. You sent him home on a taxi and suddenly came up with a question. There are n crossroads in your city and several bidirectional roads connecting some of them. A taxi ride is a path from some crossroads to another one without passing the same crossroads twice. You have a collection of rides made by one driver and now you wonder if this driver can be a robot or they are definitely a human. You think that the driver can be a robot if for every two crossroads a and b the driver always chooses the same path whenever he drives from a to b . Note that a and b here do not have to be the endpoints of a ride and that the path from b to a can be different. On the contrary, if the driver ever has driven two different paths from a to b , they are definitely a human. Given the system of roads and the description of all rides available to you, determine if the driver can be a robot or not. Each test contains one or more test cases. The first line contains a single integer t ( 1 <= t <= 3 cdot 10^5 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= n <= 3 cdot 10^5 ) -- the number of crossroads in the city. The next line contains a single integer q ( 1 <= q <= 3 cdot 10^5 ) -- the number of rides available to you. Each of the following q lines starts with a single integer k ( 2 <= k <= n ) -- the number of crossroads visited by the driver on this ride. It is followed by k integers c_1 , c_2 , ..., c_k ( 1 <= c_i <= n ) -- the crossroads in the order the driver visited them. It is guaranteed that all crossroads in one ride are distinct. It is guaranteed that the sum of values k among all rides of all test cases does not exceed 3 cdot 10^5 . It is guaranteed that the s"... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
46311610 |
yasugongshang |
H |
Nov. 28, 2018, 1:30 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
93 |
14131200 |
|
3100 |
49361133 |
code_struck |
H |
Feb. 2, 2019, 12:54 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
124 |
15052800 |
|
3100 |
46311525 |
yasugongshang |
H |
Nov. 28, 2018, 1:27 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
139 |
14131200 |
|
3100 |
46231114 |
krijgertje |
H |
Nov. 25, 2018, 8:51 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
139 |
19865600 |
|
3100 |
50183160 |
Gloid |
H |
Feb. 19, 2019, 3:35 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
139 |
26828800 |
|
3100 |
46311532 |
yasugongshang |
H |
Nov. 28, 2018, 1:28 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
140 |
14131200 |
|
3100 |
46311430 |
yasugongshang |
H |
Nov. 28, 2018, 1:25 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
140 |
14131200 |
|
3100 |
46364094 |
Panole233 |
H |
Nov. 29, 2018, 12:26 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
140 |
17305600 |
|
3100 |
48657291 |
ReaLNero1 |
H |
Jan. 21, 2019, 3:38 a.m. |
OK |
GNU C++11 |
TESTS |
121 |
140 |
19865600 |
|
3100 |
47232214 |
frodakcin |
H |
Dec. 18, 2018, 6:38 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
156 |
20684800 |
|
3100 |
47533111 |
tmwilliamlin168 |
H |
Dec. 26, 2018, 9:06 p.m. |
OK |
GNU C++14 |
TESTS |
121 |
139 |
13107200 |
|
3100 |
47533066 |
tmwilliamlin168 |
H |
Dec. 26, 2018, 9:03 p.m. |
OK |
GNU C++14 |
TESTS |
121 |
155 |
13107200 |
|
3100 |
54467546 |
mayaohua2003 |
H |
May 22, 2019, 1:54 a.m. |
OK |
GNU C++14 |
TESTS |
121 |
155 |
17100800 |
|
3100 |
46234622 |
neal |
H |
Nov. 26, 2018, 12:46 a.m. |
OK |
GNU C++14 |
TESTS |
121 |
171 |
12697600 |
|
3100 |
46234357 |
neal |
H |
Nov. 26, 2018, 12:23 a.m. |
OK |
GNU C++14 |
TESTS |
121 |
171 |
12697600 |
|
3100 |
46231353 |
yarek |
H |
Nov. 25, 2018, 8:59 p.m. |
OK |
GNU C++14 |
TESTS |
121 |
171 |
16384000 |
|
3100 |
46407242 |
newbiegcz |
H |
Nov. 30, 2018, 3:15 p.m. |
OK |
GNU C++14 |
TESTS |
121 |
171 |
18329600 |
|
3100 |
46779935 |
BSBandme |
H |
Dec. 9, 2018, 1:01 a.m. |
OK |
GNU C++14 |
TESTS |
121 |
171 |
18534400 |
|
3100 |
54541095 |
gtrhetr |
H |
May 24, 2019, 1:54 a.m. |
OK |
GNU C++14 |
TESTS |
121 |
202 |
17817600 |
|
3100 |
46240345 |
apiadu |
H |
Nov. 26, 2018, 7:27 a.m. |
OK |
GNU C++14 |
TESTS |
121 |
280 |
12697600 |
|
3100 |
56233391 |
maroonrk |
H |
June 28, 2019, 3:08 p.m. |
OK |
GNU C++17 |
TESTS |
121 |
140 |
12697600 |
|
3100 |
46232766 |
Benq |
H |
Nov. 25, 2018, 10:11 p.m. |
OK |
GNU C++17 |
TESTS |
121 |
155 |
14336000 |
|
3100 |
46297632 |
saketh |
H |
Nov. 28, 2018, 4:50 a.m. |
OK |
GNU C++17 |
TESTS |
121 |
156 |
14336000 |
|
3100 |
46226743 |
V--o_o--V |
H |
Nov. 25, 2018, 6:57 p.m. |
OK |
GNU C++17 |
TESTS |
121 |
156 |
17920000 |
|
3100 |
49782102 |
HIR180 |
H |
Feb. 11, 2019, 5:58 p.m. |
OK |
GNU C++17 |
TESTS |
121 |
249 |
17715200 |
|
3100 |
46886467 |
AwD |
H |
Dec. 11, 2018, 1:09 a.m. |
OK |
GNU C++17 |
TESTS |
121 |
296 |
24985600 |
|
3100 |
57629841 |
ZevenWu |
H |
July 24, 2019, 8:23 a.m. |
OK |
GNU C++17 |
TESTS |
121 |
296 |
817664000 |
|
3100 |
48571198 |
Shayan.P |
H |
Jan. 19, 2019, 12:04 p.m. |
OK |
GNU C++17 |
TESTS |
121 |
311 |
199577600 |
|
3100 |
48571132 |
Shayan.P |
H |
Jan. 19, 2019, 12:02 p.m. |
OK |
GNU C++17 |
TESTS |
121 |
311 |
199577600 |
|
3100 |
48571250 |
Shayan.P |
H |
Jan. 19, 2019, 12:05 p.m. |
OK |
GNU C++17 |
TESTS |
121 |
327 |
170291200 |
|
3100 |
46265117 |
mmaxio |
H |
Nov. 27, 2018, 1:26 a.m. |
OK |
Java 8 |
TESTS |
121 |
264 |
40857600 |
|
3100 |
remove filters
Back to search problems