QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#664984#7157. Bikes vs Carsttamx34 18ms6956kbC++142.8kb2024-10-21 23:59:132024-10-21 23:59:14

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 1ms
memory: 3584kb

input:

14 1000000
494185
494185 494185
494185 494185 494185
494185 494185 494185 494185
494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 49...

output:

26
0 1 536641
1 2 536641
2 3 536641
3 4 536641
4 5 536641
5 6 536641
6 7 536641
7 8 536641
8 9 536641
9 10 536641
10 11 536641
11 12 536641
12 13 536641
0 1 505815
0 2 505815
0 3 505815
0 4 505815
0 5 505815
0 6 505815
0 7 505815
0 8 505815
0 9 505815
0 10 505815
0 11 505815
0 12 505815
0 13 505815

result:

ok 

Test #2:

score: 10
Accepted
time: 1ms
memory: 3780kb

input:

37 1000000
891050
891050 891050
891050 891050 891050
891050 891050 891050 891050
891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 89...

output:

NO

result:

ok 

Test #3:

score: 10
Accepted
time: 1ms
memory: 3992kb

input:

40 1000000
824509
824509 824509
824509 824509 824509
824509 824509 824509 824509
824509 824509 824509 824509 824509
824509 824509 824509 824509 824509 824509
824509 824509 824509 824509 824509 824509 824509
824509 824509 824509 824509 824509 824509 824509 824509
824509 824509 824509 824509 824509 82...

output:

78
0 1 175491
1 2 175491
2 3 175491
3 4 175491
4 5 175491
5 6 175491
6 7 175491
7 8 175491
8 9 175491
9 10 175491
10 11 175491
11 12 175491
12 13 175491
13 14 175491
14 15 175491
15 16 175491
16 17 175491
17 18 175491
18 19 175491
19 20 175491
20 21 175491
21 22 175491
22 23 175491
23 24 175491
24 2...

result:

ok 

Test #4:

score: 10
Accepted
time: 1ms
memory: 3704kb

input:

40 1000000
209146
209146 209146
209146 209146 209146
209146 209146 209146 209146
209146 209146 209146 209146 209146
209146 209146 209146 209146 209146 209146
209146 209146 209146 209146 209146 209146 209146
209146 209146 209146 209146 209146 209146 209146 209146
209146 209146 209146 209146 209146 20...

output:

78
0 1 806691
1 2 806691
2 3 806691
3 4 806691
4 5 806691
5 6 806691
6 7 806691
7 8 806691
8 9 806691
9 10 806691
10 11 806691
11 12 806691
12 13 806691
13 14 806691
14 15 806691
15 16 806691
16 17 806691
17 18 806691
18 19 806691
19 20 806691
20 21 806691
21 22 806691
22 23 806691
23 24 806691
24 2...

result:

ok 

Test #5:

score: 10
Accepted
time: 1ms
memory: 3692kb

input:

40 1000000
750045
750045 750045
750045 750045 750045
750045 750045 750045 750045
750045 750045 750045 750045 750045
750045 750045 750045 750045 750045 750045
750045 750045 750045 750045 750045 750045 750045
750045 750045 750045 750045 750045 750045 750045 750045
750045 750045 750045 750045 750045 75...

output:

NO

result:

ok 

Subtask #2:

score: 5
Accepted

Dependency #1:

100%
Accepted

Test #6:

score: 5
Accepted
time: 0ms
memory: 3596kb

input:

14 1000000
494185
494185 494185
494185 494185 494185
494185 494185 494185 494185
494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 49...

output:

26
0 1 536641
1 2 536641
2 3 536641
3 4 536641
4 5 536641
5 6 536641
6 7 536641
7 8 536641
8 9 536641
9 10 536641
10 11 536641
11 12 536641
12 13 536641
0 1 505815
0 2 505815
0 3 505815
0 4 505815
0 5 505815
0 6 505815
0 7 505815
0 8 505815
0 9 505815
0 10 505815
0 11 505815
0 12 505815
0 13 505815

result:

ok 

Test #7:

score: 5
Accepted
time: 1ms
memory: 3632kb

input:

37 1000000
891050
891050 891050
891050 891050 891050
891050 891050 891050 891050
891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 89...

output:

NO

result:

ok 

Test #8:

score: 5
Accepted
time: 0ms
memory: 3708kb

input:

40 1000000
824509
824509 824509
824509 824509 824509
824509 824509 824509 824509
824509 824509 824509 824509 824509
824509 824509 824509 824509 824509 824509
824509 824509 824509 824509 824509 824509 824509
824509 824509 824509 824509 824509 824509 824509 824509
824509 824509 824509 824509 824509 82...

output:

78
0 1 175491
1 2 175491
2 3 175491
3 4 175491
4 5 175491
5 6 175491
6 7 175491
7 8 175491
8 9 175491
9 10 175491
10 11 175491
11 12 175491
12 13 175491
13 14 175491
14 15 175491
15 16 175491
16 17 175491
17 18 175491
18 19 175491
19 20 175491
20 21 175491
21 22 175491
22 23 175491
23 24 175491
24 2...

result:

ok 

Test #9:

score: 5
Accepted
time: 0ms
memory: 3960kb

input:

40 1000000
209146
209146 209146
209146 209146 209146
209146 209146 209146 209146
209146 209146 209146 209146 209146
209146 209146 209146 209146 209146 209146
209146 209146 209146 209146 209146 209146 209146
209146 209146 209146 209146 209146 209146 209146 209146
209146 209146 209146 209146 209146 20...

output:

78
0 1 806691
1 2 806691
2 3 806691
3 4 806691
4 5 806691
5 6 806691
6 7 806691
7 8 806691
8 9 806691
9 10 806691
10 11 806691
11 12 806691
12 13 806691
13 14 806691
14 15 806691
15 16 806691
16 17 806691
17 18 806691
18 19 806691
19 20 806691
20 21 806691
21 22 806691
22 23 806691
23 24 806691
24 2...

result:

ok 

Test #10:

score: 5
Accepted
time: 1ms
memory: 3756kb

input:

40 1000000
750045
750045 750045
750045 750045 750045
750045 750045 750045 750045
750045 750045 750045 750045 750045
750045 750045 750045 750045 750045 750045
750045 750045 750045 750045 750045 750045 750045
750045 750045 750045 750045 750045 750045 750045 750045
750045 750045 750045 750045 750045 75...

output:

NO

result:

ok 

Test #11:

score: 5
Accepted
time: 1ms
memory: 3888kb

input:

74 1000000
883981
883981 883981
883981 883981 883981
883981 883981 883981 883981
883981 883981 883981 883981 883981
883981 883981 883981 883981 883981 883981
883981 883981 883981 883981 883981 883981 883981
883981 883981 883981 883981 883981 883981 883981 883981
883981 883981 883981 883981 883981 88...

output:

146
0 1 259437
1 2 259437
2 3 259437
3 4 259437
4 5 259437
5 6 259437
6 7 259437
7 8 259437
8 9 259437
9 10 259437
10 11 259437
11 12 259437
12 13 259437
13 14 259437
14 15 259437
15 16 259437
16 17 259437
17 18 259437
18 19 259437
19 20 259437
20 21 259437
21 22 259437
22 23 259437
23 24 259437
24 ...

result:

ok 

Test #12:

score: 5
Accepted
time: 5ms
memory: 4756kb

input:

293 1000000
699926
699926 699926
699926 699926 699926
699926 699926 699926 699926
699926 699926 699926 699926 699926
699926 699926 699926 699926 699926 699926
699926 699926 699926 699926 699926 699926 699926
699926 699926 699926 699926 699926 699926 699926 699926
699926 699926 699926 699926 699926 6...

output:

NO

result:

ok 

Test #13:

score: 5
Accepted
time: 6ms
memory: 5816kb

input:

387 1000000
771151
771151 771151
771151 771151 771151
771151 771151 771151 771151
771151 771151 771151 771151 771151
771151 771151 771151 771151 771151 771151
771151 771151 771151 771151 771151 771151 771151
771151 771151 771151 771151 771151 771151 771151 771151
771151 771151 771151 771151 771151 7...

output:

772
0 1 228849
1 2 228849
2 3 228849
3 4 228849
4 5 228849
5 6 228849
6 7 228849
7 8 228849
8 9 228849
9 10 228849
10 11 228849
11 12 228849
12 13 228849
13 14 228849
14 15 228849
15 16 228849
16 17 228849
17 18 228849
18 19 228849
19 20 228849
20 21 228849
21 22 228849
22 23 228849
23 24 228849
24 ...

result:

ok 

Test #14:

score: 5
Accepted
time: 15ms
memory: 6088kb

input:

498 1000000
419303
419303 419303
419303 419303 419303
419303 419303 419303 419303
419303 419303 419303 419303 419303
419303 419303 419303 419303 419303 419303
419303 419303 419303 419303 419303 419303 419303
419303 419303 419303 419303 419303 419303 419303 419303
419303 419303 419303 419303 419303 4...

output:

994
0 1 941592
1 2 941592
2 3 941592
3 4 941592
4 5 941592
5 6 941592
6 7 941592
7 8 941592
8 9 941592
9 10 941592
10 11 941592
11 12 941592
12 13 941592
13 14 941592
14 15 941592
15 16 941592
16 17 941592
17 18 941592
18 19 941592
19 20 941592
20 21 941592
21 22 941592
22 23 941592
23 24 941592
24 ...

result:

ok 

Test #15:

score: 5
Accepted
time: 8ms
memory: 5608kb

input:

500 1000000
399243
399243 399243
399243 399243 399243
399243 399243 399243 399243
399243 399243 399243 399243 399243
399243 399243 399243 399243 399243 399243
399243 399243 399243 399243 399243 399243 399243
399243 399243 399243 399243 399243 399243 399243 399243
399243 399243 399243 399243 399243 3...

output:

NO

result:

ok 

Subtask #3:

score: 0
Wrong Answer

Test #16:

score: 17
Accepted
time: 0ms
memory: 3656kb

input:

14 1000000
494185
494185 494185
494185 494185 494185
494185 494185 494185 494185
494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 49...

output:

26
0 1 536641
1 2 536641
2 3 536641
3 4 536641
4 5 536641
5 6 536641
6 7 536641
7 8 536641
8 9 536641
9 10 536641
10 11 536641
11 12 536641
12 13 536641
0 1 505815
0 2 505815
0 3 505815
0 4 505815
0 5 505815
0 6 505815
0 7 505815
0 8 505815
0 9 505815
0 10 505815
0 11 505815
0 12 505815
0 13 505815

result:

ok 

Test #17:

score: 17
Accepted
time: 1ms
memory: 3740kb

input:

37 1000000
891050
891050 891050
891050 891050 891050
891050 891050 891050 891050
891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 89...

output:

NO

result:

ok 

Test #18:

score: 17
Accepted
time: 1ms
memory: 3992kb

input:

40 1000000
824509
824509 824509
824509 824509 824509
824509 824509 824509 824509
824509 824509 824509 824509 824509
824509 824509 824509 824509 824509 824509
824509 824509 824509 824509 824509 824509 824509
824509 824509 824509 824509 824509 824509 824509 824509
824509 824509 824509 824509 824509 82...

output:

78
0 1 175491
1 2 175491
2 3 175491
3 4 175491
4 5 175491
5 6 175491
6 7 175491
7 8 175491
8 9 175491
9 10 175491
10 11 175491
11 12 175491
12 13 175491
13 14 175491
14 15 175491
15 16 175491
16 17 175491
17 18 175491
18 19 175491
19 20 175491
20 21 175491
21 22 175491
22 23 175491
23 24 175491
24 2...

result:

ok 

Test #19:

score: 17
Accepted
time: 1ms
memory: 3708kb

input:

40 1000000
209146
209146 209146
209146 209146 209146
209146 209146 209146 209146
209146 209146 209146 209146 209146
209146 209146 209146 209146 209146 209146
209146 209146 209146 209146 209146 209146 209146
209146 209146 209146 209146 209146 209146 209146 209146
209146 209146 209146 209146 209146 20...

output:

78
0 1 806691
1 2 806691
2 3 806691
3 4 806691
4 5 806691
5 6 806691
6 7 806691
7 8 806691
8 9 806691
9 10 806691
10 11 806691
11 12 806691
12 13 806691
13 14 806691
14 15 806691
15 16 806691
16 17 806691
17 18 806691
18 19 806691
19 20 806691
20 21 806691
21 22 806691
22 23 806691
23 24 806691
24 2...

result:

ok 

Test #20:

score: 17
Accepted
time: 0ms
memory: 3644kb

input:

40 1000000
750045
750045 750045
750045 750045 750045
750045 750045 750045 750045
750045 750045 750045 750045 750045
750045 750045 750045 750045 750045 750045
750045 750045 750045 750045 750045 750045 750045
750045 750045 750045 750045 750045 750045 750045 750045
750045 750045 750045 750045 750045 75...

output:

NO

result:

ok 

Test #21:

score: 0
Wrong Answer
time: 1ms
memory: 3940kb

input:

29 1000000
552337
552337 552337
552337 552337 552337
552337 552337 552337 552337
552337 552337 552337 552337 552351
552337 552337 552337 552337 552337 552337
552337 552337 552337 552337 552337 552337 552337
552337 552337 552337 552337 552337 552337 552337 552337
552337 552337 552495 552337 552337 55...

output:

56
0 1 447663
1 2 447663
2 3 447663
3 4 447663
4 5 447663
5 6 447663
6 7 447663
7 8 447663
8 9 447663
9 10 447663
10 11 447663
11 12 447663
12 13 447663
13 14 447663
14 15 447663
15 16 447663
16 17 447663
17 18 447663
18 19 447663
19 20 447663
20 21 447663
21 22 447663
22 23 447663
23 24 447663
24 2...

result:

wrong answer Max Min 4 - 1 not equal bij is 447663 should be 448166

Subtask #4:

score: 0
Wrong Answer

Test #39:

score: 0
Wrong Answer
time: 1ms
memory: 4288kb

input:

163 1
0
0 0
0 1 0
1 0 0 0
0 0 0 0 0
1 0 0 0 1 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 1
0 0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 1
0 1 0 1 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 1 1 0 0 0
0 0 0 0 0 1 0 0 0 0 0 1 1 0 0
0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 1 1 0 0 ...

output:

289
6 4 0
6 4 1
8 7 0
8 7 1
13 3 0
13 3 1
15 12 0
15 12 1
18 11 0
18 11 1
19 4 0
19 4 1
20 0 0
20 0 1
21 12 0
21 12 1
22 1 0
22 1 1
26 17 0
26 17 1
29 28 0
29 28 1
32 28 0
32 28 1
35 3 0
35 3 1
36 3 0
36 3 1
37 3 0
37 3 1
38 3 0
38 3 1
41 5 0
41 5 1
42 9 0
42 9 1
43 33 0
43 33 1
44 3 0
44 3 1
46 5 0...

result:

wrong answer Min Max 12 - 5 not equal aij, is 1, should be 0

Subtask #5:

score: 19
Accepted

Dependency #2:

100%
Accepted

Test #56:

score: 19
Accepted
time: 0ms
memory: 3656kb

input:

14 1000000
494185
494185 494185
494185 494185 494185
494185 494185 494185 494185
494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 49...

output:

26
0 1 536641
1 2 536641
2 3 536641
3 4 536641
4 5 536641
5 6 536641
6 7 536641
7 8 536641
8 9 536641
9 10 536641
10 11 536641
11 12 536641
12 13 536641
0 1 505815
0 2 505815
0 3 505815
0 4 505815
0 5 505815
0 6 505815
0 7 505815
0 8 505815
0 9 505815
0 10 505815
0 11 505815
0 12 505815
0 13 505815

result:

ok 

Test #57:

score: 19
Accepted
time: 0ms
memory: 3632kb

input:

37 1000000
891050
891050 891050
891050 891050 891050
891050 891050 891050 891050
891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 89...

output:

NO

result:

ok 

Test #58:

score: 19
Accepted
time: 1ms
memory: 3664kb

input:

40 1000000
824509
824509 824509
824509 824509 824509
824509 824509 824509 824509
824509 824509 824509 824509 824509
824509 824509 824509 824509 824509 824509
824509 824509 824509 824509 824509 824509 824509
824509 824509 824509 824509 824509 824509 824509 824509
824509 824509 824509 824509 824509 82...

output:

78
0 1 175491
1 2 175491
2 3 175491
3 4 175491
4 5 175491
5 6 175491
6 7 175491
7 8 175491
8 9 175491
9 10 175491
10 11 175491
11 12 175491
12 13 175491
13 14 175491
14 15 175491
15 16 175491
16 17 175491
17 18 175491
18 19 175491
19 20 175491
20 21 175491
21 22 175491
22 23 175491
23 24 175491
24 2...

result:

ok 

Test #59:

score: 19
Accepted
time: 0ms
memory: 3712kb

input:

40 1000000
209146
209146 209146
209146 209146 209146
209146 209146 209146 209146
209146 209146 209146 209146 209146
209146 209146 209146 209146 209146 209146
209146 209146 209146 209146 209146 209146 209146
209146 209146 209146 209146 209146 209146 209146 209146
209146 209146 209146 209146 209146 20...

output:

78
0 1 806691
1 2 806691
2 3 806691
3 4 806691
4 5 806691
5 6 806691
6 7 806691
7 8 806691
8 9 806691
9 10 806691
10 11 806691
11 12 806691
12 13 806691
13 14 806691
14 15 806691
15 16 806691
16 17 806691
17 18 806691
18 19 806691
19 20 806691
20 21 806691
21 22 806691
22 23 806691
23 24 806691
24 2...

result:

ok 

Test #60:

score: 19
Accepted
time: 1ms
memory: 3768kb

input:

40 1000000
750045
750045 750045
750045 750045 750045
750045 750045 750045 750045
750045 750045 750045 750045 750045
750045 750045 750045 750045 750045 750045
750045 750045 750045 750045 750045 750045 750045
750045 750045 750045 750045 750045 750045 750045 750045
750045 750045 750045 750045 750045 75...

output:

NO

result:

ok 

Test #61:

score: 19
Accepted
time: 1ms
memory: 3896kb

input:

74 1000000
883981
883981 883981
883981 883981 883981
883981 883981 883981 883981
883981 883981 883981 883981 883981
883981 883981 883981 883981 883981 883981
883981 883981 883981 883981 883981 883981 883981
883981 883981 883981 883981 883981 883981 883981 883981
883981 883981 883981 883981 883981 88...

output:

146
0 1 259437
1 2 259437
2 3 259437
3 4 259437
4 5 259437
5 6 259437
6 7 259437
7 8 259437
8 9 259437
9 10 259437
10 11 259437
11 12 259437
12 13 259437
13 14 259437
14 15 259437
15 16 259437
16 17 259437
17 18 259437
18 19 259437
19 20 259437
20 21 259437
21 22 259437
22 23 259437
23 24 259437
24 ...

result:

ok 

Test #62:

score: 19
Accepted
time: 2ms
memory: 4692kb

input:

293 1000000
699926
699926 699926
699926 699926 699926
699926 699926 699926 699926
699926 699926 699926 699926 699926
699926 699926 699926 699926 699926 699926
699926 699926 699926 699926 699926 699926 699926
699926 699926 699926 699926 699926 699926 699926 699926
699926 699926 699926 699926 699926 6...

output:

NO

result:

ok 

Test #63:

score: 19
Accepted
time: 5ms
memory: 5812kb

input:

387 1000000
771151
771151 771151
771151 771151 771151
771151 771151 771151 771151
771151 771151 771151 771151 771151
771151 771151 771151 771151 771151 771151
771151 771151 771151 771151 771151 771151 771151
771151 771151 771151 771151 771151 771151 771151 771151
771151 771151 771151 771151 771151 7...

output:

772
0 1 228849
1 2 228849
2 3 228849
3 4 228849
4 5 228849
5 6 228849
6 7 228849
7 8 228849
8 9 228849
9 10 228849
10 11 228849
11 12 228849
12 13 228849
13 14 228849
14 15 228849
15 16 228849
16 17 228849
17 18 228849
18 19 228849
19 20 228849
20 21 228849
21 22 228849
22 23 228849
23 24 228849
24 ...

result:

ok 

Test #64:

score: 19
Accepted
time: 15ms
memory: 6244kb

input:

498 1000000
419303
419303 419303
419303 419303 419303
419303 419303 419303 419303
419303 419303 419303 419303 419303
419303 419303 419303 419303 419303 419303
419303 419303 419303 419303 419303 419303 419303
419303 419303 419303 419303 419303 419303 419303 419303
419303 419303 419303 419303 419303 4...

output:

994
0 1 941592
1 2 941592
2 3 941592
3 4 941592
4 5 941592
5 6 941592
6 7 941592
7 8 941592
8 9 941592
9 10 941592
10 11 941592
11 12 941592
12 13 941592
13 14 941592
14 15 941592
15 16 941592
16 17 941592
17 18 941592
18 19 941592
19 20 941592
20 21 941592
21 22 941592
22 23 941592
23 24 941592
24 ...

result:

ok 

Test #65:

score: 19
Accepted
time: 12ms
memory: 5576kb

input:

500 1000000
399243
399243 399243
399243 399243 399243
399243 399243 399243 399243
399243 399243 399243 399243 399243
399243 399243 399243 399243 399243 399243
399243 399243 399243 399243 399243 399243 399243
399243 399243 399243 399243 399243 399243 399243 399243
399243 399243 399243 399243 399243 3...

output:

NO

result:

ok 

Test #66:

score: 19
Accepted
time: 0ms
memory: 4936kb

input:

284 1000000
635345
635345 635345
635345 635345 635345
635345 635345 635345 635345
635345 635345 635345 635345 635345
635345 635345 635345 635345 635345 635345
635345 635345 635345 635345 635345 635345 635345
635345 635345 635345 635345 635345 635345 635345 635345
635345 635345 635345 635345 635345 6...

output:

566
0 1 364655
1 2 364655
2 3 364655
3 4 364655
4 5 364655
5 6 364655
6 7 364655
7 8 364655
8 9 364655
9 10 364655
10 11 364655
11 12 364655
12 13 364655
13 14 364655
14 15 364655
15 16 364655
16 17 364655
17 18 364655
18 19 364655
19 20 364655
20 21 364655
21 22 364655
22 23 364655
23 24 364655
24 ...

result:

ok 

Test #67:

score: 19
Accepted
time: 12ms
memory: 5436kb

input:

483 1000000
403419
522267 471978
212936 940257 76971
334161 459947 694156 708157
806463 550365 700576 825569 726608
753985 6603 550332 602239 34358 185981
693778 208464 362256 672765 752997 40852 929118
916573 640331 114992 791071 487912 368137 275916 741475
719830 62722 401844 942381 111164 453890 ...

output:

NO

result:

ok 

Test #68:

score: 19
Accepted
time: 9ms
memory: 6224kb

input:

497 1000000
580648
580648 580648
580648 580648 580648
580648 580648 580648 580648
580648 580648 580648 580648 580648
580648 580648 580648 580648 580648 580648
580648 580648 580648 580648 580648 580648 580648
580648 580648 580648 580648 580648 580648 580648 580648
580648 580648 580648 580648 580648 5...

output:

992
0 1 419352
1 2 419352
2 3 419352
3 4 419352
4 5 419352
5 6 419352
6 7 419352
7 8 419352
8 9 419352
9 10 419352
10 11 419352
11 12 419352
12 13 419352
13 14 419352
14 15 419352
15 16 419352
16 17 419352
17 18 419352
18 19 419352
19 20 419352
20 21 419352
21 22 419352
22 23 419352
23 24 419352
24 ...

result:

ok 

Test #69:

score: 19
Accepted
time: 12ms
memory: 5512kb

input:

500 1000000
557164
840277 711833
290274 26166 463977
521625 200536 365050 218569
527722 75647 921083 441762 905345
721686 163907 707268 264697 727595 480411
440243 460247 604508 503960 370022 148498 281212
116447 255431 423763 724292 221159 968701 583391 868361
148302 166379 32628 912700 46956 22759...

output:

NO

result:

ok 

Test #70:

score: 19
Accepted
time: 11ms
memory: 6104kb

input:

500 1000000
221407
221407 221407
221407 221407 221407
221407 221407 221407 221407
221407 221407 221407 221407 221407
221407 221407 221407 221407 221407 221407
221407 221407 221407 221407 221407 221407 221407
221407 221407 221407 221407 221407 221407 221407 221407
221407 221407 221407 221407 221407 2...

output:

998
0 1 778593
1 2 778593
2 3 778593
3 4 778593
4 5 778593
5 6 778593
6 7 778593
7 8 778593
8 9 778593
9 10 778593
10 11 778593
11 12 778593
12 13 778593
13 14 778593
14 15 778593
15 16 778593
16 17 778593
17 18 778593
18 19 778593
19 20 778593
20 21 778593
21 22 778593
22 23 778593
23 24 778593
24 ...

result:

ok 

Test #71:

score: 19
Accepted
time: 11ms
memory: 6448kb

input:

500 1000000
773628
833544 773628
346056 346056 346056
788373 773628 788373 346056
701641 701641 701641 346056 701641
830530 773628 830530 346056 788373 701641
507760 507760 507760 346056 507760 507760 507760
315780 315780 315780 315780 315780 315780 315780 315780
707756 707756 707756 346056 707756 7...

output:

998
0 1 999725
1 2 999725
2 3 999725
3 4 999725
4 5 999725
5 6 999725
6 7 999725
7 8 999725
8 9 999725
9 10 999725
10 11 999725
11 12 999725
12 13 999725
13 14 999725
14 15 999725
15 16 999725
16 17 999725
17 18 999725
18 19 999725
19 20 999725
20 21 999725
21 22 999725
22 23 999725
23 24 999725
24 ...

result:

ok 

Test #72:

score: 19
Accepted
time: 15ms
memory: 6248kb

input:

500 1000000
650078
560539 560539
560539 560539 650078
560539 560539 560539 560539
560539 560539 560539 560539 650078
560539 560539 560539 560539 560539 560539
560539 560539 560539 560539 560539 560539 650078
560539 560539 560539 560539 560539 560539 560539 560539
560539 560539 560539 560539 560539 5...

output:

998
0 1 439461
1 2 439461
2 3 439461
3 4 439461
4 5 439461
5 6 439461
6 7 439461
7 8 439461
8 9 439461
9 10 439461
10 11 439461
11 12 439461
12 13 439461
13 14 439461
14 15 439461
15 16 439461
16 17 439461
17 18 439461
18 19 439461
19 20 439461
20 21 439461
21 22 439461
22 23 439461
23 24 439461
24 ...

result:

ok 

Test #73:

score: 19
Accepted
time: 18ms
memory: 6532kb

input:

500 1000000
585835
173900 173900
585835 890308 173900
173900 173900 283544 173900
565192 565192 173900 565192 173900
509953 509953 173900 509953 173900 509953
509953 509953 173900 509953 173900 509953 663260
509953 509953 173900 509953 173900 509953 663260 929326
173900 173900 283544 173900 753869 1...

output:

998
0 1 998437
1 2 998437
2 3 998437
3 4 998437
4 5 998437
5 6 998437
6 7 998437
7 8 998437
8 9 998437
9 10 998437
10 11 998437
11 12 998437
12 13 998437
13 14 998437
14 15 998437
15 16 998437
16 17 998437
17 18 998437
18 19 998437
19 20 998437
20 21 998437
21 22 998437
22 23 998437
23 24 998437
24 ...

result:

ok 

Test #74:

score: 19
Accepted
time: 18ms
memory: 6956kb

input:

500 1000000
662192
662192 769210
662192 755840 755840
662192 769210 794208 755840
662192 769210 813864 755840 794208
662192 769210 794208 755840 824417 794208
662192 755840 755840 858373 755840 755840 755840
662192 769210 826589 755840 794208 813864 794208 755840
662192 769210 812227 755840 794208 8...

output:

NO

result:

ok 

Test #75:

score: 19
Accepted
time: 9ms
memory: 5796kb

input:

500 1000000
748977
720005 720005
0 0 0
748977 751079 720005 0
0 0 0 491274 0
0 0 0 491274 0 679920
515161 515161 515161 0 515161 0 0
0 0 0 491274 0 684691 679920 0
0 0 0 491274 0 684691 679920 0 760030
515161 515161 515161 0 515161 0 0 551311 0 0
748977 762034 720005 0 751079 0 0 515161 0 0 515161
2...

output:

NO

result:

ok 

Subtask #6:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

0%