QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#664930#7157. Bikes vs Carsttamx10 2ms4424kbC++142.3kb2024-10-21 23:36:472024-10-21 23:36:47

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 0ms
memory: 3892kb

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:

208
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
0 1 536641
0 2 536641
0 3 536641
0 4 536641
0 5 536641
0 6 536641
0 7 536641
0 8 536641
0 9 536641
0 10 536641
0 11 536641
0 12 536641
0 13 536641
0 ...

result:

ok 

Test #2:

score: 10
Accepted
time: 0ms
memory: 3924kb

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: 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:

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

result:

ok 

Test #4:

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

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:

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

result:

ok 

Test #5:

score: 10
Accepted
time: 0ms
memory: 3832kb

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: 0
Wrong Answer

Dependency #1:

100%
Accepted

Test #6:

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

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:

208
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
0 1 536641
0 2 536641
0 3 536641
0 4 536641
0 5 536641
0 6 536641
0 7 536641
0 8 536641
0 9 536641
0 10 536641
0 11 536641
0 12 536641
0 13 536641
0 ...

result:

ok 

Test #7:

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

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: 1ms
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:

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

result:

ok 

Test #9:

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

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:

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

result:

ok 

Test #10:

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

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: 0
Wrong Answer
time: 2ms
memory: 3928kb

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:

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

result:

wrong answer Used more than 2023 edges: 5548

Subtask #3:

score: 0
Wrong Answer

Test #16:

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

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:

208
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
0 1 536641
0 2 536641
0 3 536641
0 4 536641
0 5 536641
0 6 536641
0 7 536641
0 8 536641
0 9 536641
0 10 536641
0 11 536641
0 12 536641
0 13 536641
0 ...

result:

ok 

Test #17:

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

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: 3988kb

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:

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

result:

ok 

Test #19:

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

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:

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

result:

ok 

Test #20:

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

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: 17
Accepted
time: 1ms
memory: 3740kb

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:

868
4 27 349923
5 22 413859
26 28 436039
14 23 443567
12 24 445085
6 17 445569
4 16 446767
18 19 446825
2 9 447505
5 14 447561
3 18 447624
4 5 447649
8 13 447654
12 25 447656
0 1 447663
0 2 447663
0 3 447663
0 4 447663
0 6 447663
0 7 447663
0 8 447663
0 10 447663
0 11 447663
0 12 447663
0 15 447663
...

result:

ok 

Test #22:

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

input:

38 1000000
644854
305125 329501
622065 236824 258517
48699 83625 610390 428345
701467 277887 953203 525250 385114
76769 66822 672789 788732 775160 808418
853646 260433 492908 977883 617979 867959 421170
502969 424166 347568 6763 982035 787624 793664 504750
538453 215494 17775 859568 661147 434750 87...

output:

NO

result:

ok 

Test #23:

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

input:

39 1000000
439480
439480 439480
439480 439480 439480
439480 439480 439480 439480
439480 439480 439480 439480 439480
439480 439480 439480 439480 439480 439480
439480 439480 439480 439480 439480 439480 439480
439480 439480 439480 439480 439480 439480 439480 439480
439480 439480 439480 439480 439480 43...

output:

1558
5 12 108590
13 24 250386
16 19 408851
34 35 538432
8 10 539240
13 38 553144
18 31 555321
22 36 557239
8 20 560159
29 37 560349
4 34 560396
6 13 560405
0 18 560516
5 15 560519
0 1 560520
0 2 560520
0 3 560520
0 4 560520
0 5 560520
0 6 560520
0 7 560520
0 8 560520
0 9 560520
0 11 560520
0 14 5605...

result:

ok 

Test #24:

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

input:

40 1000000
812846
911882 401702
839635 826274 227560
340209 296171 94861 560840
571964 575838 494308 103484 665078
226603 679169 882216 594847 682669 947984
977195 661728 636783 21343 492814 536880 352704
6236 35639 429632 687960 183983 979198 548633 605360
26055 21697 783001 507340 363601 684140 30...

output:

NO

result:

ok 

Test #25:

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

input:

40 1000000
389519
312963 312963
312963 312963 312963
312963 312963 312963 312963
312963 312963 312963 312963 312963
312963 312963 312963 312963 312963 312963
312963 312963 312963 312963 312963 312963 312963
312963 312963 312963 312963 312963 312963 312963 312963
312963 312963 312963 312963 312963 31...

output:

1638
17 21 142736
13 35 143861
24 25 453902
0 1 610481
0 26 677558
29 30 680261
15 28 681528
8 19 686027
7 13 686822
17 34 687026
16 17 687027
0 2 687037
0 3 687037
0 4 687037
0 5 687037
0 6 687037
0 7 687037
0 8 687037
0 9 687037
0 10 687037
0 11 687037
0 12 687037
0 14 687037
0 15 687037
0 16 6870...

result:

ok 

Test #26:

score: 0
Wrong Answer
time: 0ms
memory: 3716kb

input:

40 3
2
1 1
1 1 2
1 1 1 1
1 1 1 1 2
1 1 1 1 1 1
1 1 1 1 1 1 2
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 2
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 2
1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 2
1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 2
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1...

output:

NO

result:

wrong answer Contestant said no, judge found solution

Subtask #4:

score: 0
Wrong Answer

Test #39:

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

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:

NO

result:

wrong answer Contestant said no, judge found solution

Subtask #5:

score: 0
Skipped

Dependency #2:

0%

Subtask #6:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%