QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#230471#7640. Colorful Cyclesucup-team216#TL 3406ms39156kbC++233.2kb2023-10-28 19:02:442023-10-28 19:02:45

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 4ms
memory: 36776kb

input:

2
3 3
1 2 3
2 3 1
1 3 2
5 6
1 2 1
2 3 1
1 3 2
3 4 3
3 5 3
4 5 3

output:

Yes
No

result:

ok 2 token(s): yes count is 1, no count is 1

Test #2:

score: 0
Accepted
time: 1940ms
memory: 36776kb

input:

100000
7 10
7 2 2
6 4 2
6 1 2
7 1 3
3 4 1
6 7 1
2 6 3
3 1 2
5 3 1
2 1 1
7 10
5 7 3
7 1 1
4 6 3
6 3 1
3 4 3
4 2 2
3 2 3
1 3 3
3 7 1
1 4 2
7 10
5 6 3
3 5 2
7 2 3
7 3 3
1 2 2
4 3 2
7 4 2
6 1 2
2 6 1
7 5 2
7 10
7 1 3
7 5 3
6 4 1
7 6 1
1 4 1
3 4 2
2 7 2
1 3 1
3 5 3
5 1 3
7 10
6 7 2
3 4 3
1 4 2
5 3 2
7 4 ...

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
...

result:

ok 100000 token(s): yes count is 92314, no count is 7686

Test #3:

score: 0
Accepted
time: 395ms
memory: 36496kb

input:

50000
10 15
6 2 1
4 7 1
10 3 1
10 9 2
4 5 1
3 4 1
4 6 2
5 3 1
4 9 1
3 9 3
1 2 1
9 2 3
8 10 2
8 6 1
6 1 1
10 15
4 9 3
7 10 2
1 2 1
10 4 2
4 7 2
6 5 2
6 1 1
9 10 1
6 3 3
7 8 3
9 1 1
7 9 3
1 7 3
4 8 1
8 6 3
10 15
4 1 2
4 2 1
6 7 3
6 2 2
10 8 2
1 9 1
2 8 1
5 10 3
9 6 2
9 10 1
8 4 1
2 7 3
6 8 1
1 3 1
4 6...

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Ye...

result:

ok 50000 token(s): yes count is 49364, no count is 636

Test #4:

score: 0
Accepted
time: 254ms
memory: 36520kb

input:

50000
10 20
1 9 2
2 6 3
4 3 2
3 10 1
5 10 2
10 6 2
6 7 2
7 4 1
10 1 1
4 10 1
3 9 2
2 9 2
1 3 1
3 2 1
3 6 3
5 3 2
3 8 2
5 1 3
5 2 2
9 6 1
10 20
5 10 3
5 4 2
6 4 2
4 3 2
1 7 2
1 2 2
10 6 3
7 4 2
1 4 3
8 10 3
10 2 1
7 2 1
1 6 3
9 4 2
8 1 1
10 9 2
8 6 1
5 9 3
9 8 3
1 10 2
10 20
9 5 1
9 8 3
10 2 2
6 2 3
...

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
...

result:

ok 50000 token(s): yes count is 49941, no count is 59

Test #5:

score: 0
Accepted
time: 206ms
memory: 38700kb

input:

1000
200 1000
42 68 2
101 170 2
79 159 2
65 106 3
82 28 2
92 196 3
28 37 1
5 103 1
93 183 1
117 119 3
48 127 3
139 70 2
68 100 2
95 104 1
123 134 1
65 142 2
54 69 3
45 63 1
38 60 3
142 130 2
117 36 3
43 89 2
41 143 2
49 47 1
91 130 2
151 7 1
194 149 1
24 85 2
157 41 2
177 132 2
145 40 3
124 138 2
11...

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
...

result:

ok 1000 token(s): yes count is 1000, no count is 0

Test #6:

score: 0
Accepted
time: 238ms
memory: 38672kb

input:

1000
400 1000
372 17 2
321 365 2
357 136 3
185 231 1
359 328 1
142 164 1
75 280 2
55 6 2
37 329 3
259 302 3
222 304 3
70 130 1
114 120 2
314 291 1
396 41 2
77 111 2
35 275 3
348 145 3
346 2 2
351 158 2
173 172 2
68 122 1
147 11 3
160 391 1
30 360 2
120 174 3
145 296 3
170 311 1
107 313 1
282 211 1
3...

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
...

result:

ok 1000 token(s): yes count is 1000, no count is 0

Test #7:

score: 0
Accepted
time: 212ms
memory: 36632kb

input:

1000
400 1000
372 17 2
321 365 2
357 136 2
185 231 2
359 328 2
142 164 2
75 280 2
55 6 1
37 329 1
259 302 2
222 304 2
70 130 2
114 120 2
314 291 1
396 41 2
77 111 2
35 275 2
348 145 1
346 2 1
351 158 1
173 172 1
68 122 1
147 11 1
160 391 2
30 360 1
120 174 2
145 296 2
170 311 2
107 313 1
282 211 1
3...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 1000 token(s): yes count is 0, no count is 1000

Test #8:

score: 0
Accepted
time: 3297ms
memory: 39156kb

input:

1
5002 8025
1 2 1
2 3 1
3 4 1
4 5 1
5 6 1
6 7 1
7 8 1
8 9 1
9 10 1
10 11 1
11 12 1
12 13 1
13 14 1
14 15 1
15 16 1
16 17 1
17 18 1
18 19 1
19 20 1
20 21 1
21 22 1
22 23 1
23 24 1
24 25 1
25 26 1
26 27 1
27 28 1
28 29 1
29 30 1
30 31 1
31 32 1
32 33 1
33 34 1
34 35 1
35 36 1
36 37 1
37 38 1
38 39 1
3...

output:

No

result:

ok NO

Test #9:

score: 0
Accepted
time: 3406ms
memory: 37252kb

input:

1
5002 8241
1 2 1
2 3 1
3 4 1
4 5 1
5 6 1
6 7 1
7 8 1
8 9 1
9 10 1
10 11 1
11 12 1
12 13 1
13 14 1
14 15 1
15 16 1
16 17 1
17 18 1
18 19 1
19 20 1
20 21 1
21 22 1
22 23 1
23 24 1
24 25 1
25 26 1
26 27 1
27 28 1
28 29 1
29 30 1
30 31 1
31 32 1
32 33 1
33 34 1
34 35 1
35 36 1
36 37 1
37 38 1
38 39 1
3...

output:

No

result:

ok NO

Test #10:

score: -100
Time Limit Exceeded

input:

1
50002 80241
1 2 1
2 3 1
3 4 1
4 5 1
5 6 1
6 7 1
7 8 1
8 9 1
9 10 1
10 11 1
11 12 1
12 13 1
13 14 1
14 15 1
15 16 1
16 17 1
17 18 1
18 19 1
19 20 1
20 21 1
21 22 1
22 23 1
23 24 1
24 25 1
25 26 1
26 27 1
27 28 1
28 29 1
29 30 1
30 31 1
31 32 1
32 33 1
33 34 1
34 35 1
35 36 1
36 37 1
37 38 1
38 39 1...

output:


result: