QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#787501#7524. A Challenge For a Touristucup-team3549#WA 2ms12136kbC++233.1kb2024-11-27 12:18:422024-11-27 12:18:46

详细

Test #1:

score: 100
Accepted
time: 2ms
memory: 12068kb

input:

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

output:

-1
2
4

result:

ok 3 number(s): "-1 2 4"

Test #2:

score: 0
Accepted
time: 1ms
memory: 12092kb

input:

2 1
1 2 1
1
1 2 1

output:

1

result:

ok 1 number(s): "1"

Test #3:

score: 0
Accepted
time: 0ms
memory: 12136kb

input:

5 10
1 2 4
2 2 0
1 1 7
2 1 7
4 1 1
5 5 1
4 1 4
5 2 6
1 1 2
2 4 7
10
1 4 3
1 2 5
3 2 1
3 5 5
2 4 0
3 2 0
2 1 2
2 3 6
5 1 7
2 3 3

output:

2
6
-1
-1
4
-1
6
-1
6
-1

result:

ok 10 numbers

Test #4:

score: 0
Accepted
time: 0ms
memory: 12096kb

input:

10 20
3 5 667
2 5 71
2 9 47
7 9 941
9 1 564
2 1 892
7 1 627
2 2 989
8 9 978
1 3 936
1 1 807
8 4 564
6 9 518
5 4 896
2 9 607
3 9 453
1 3 402
10 8 935
7 3 826
1 6 707
40
3 10 164
2 10 248
5 6 708
5 9 764
1 9 711
3 8 377
9 1 640
7 1 554
3 1 504
4 9 761
1 8 111
5 8 296
4 2 97
10 4 896
5 1 232
5 8 154
7 ...

output:

-1
941
-1
-1
-1
941
941
936
892
-1
896
-1
896
-1
-1
896
-1
941
-1
936
936
936
941
941
892
-1
-1
941
826
-1
896
-1
-1
936
896
-1
941
941
941
941

result:

ok 40 numbers

Test #5:

score: 0
Accepted
time: 1ms
memory: 9968kb

input:

20 40
11 3 622
15 1 463
1 13 754
10 16 87
17 16 602
19 4 1003
4 5 50
1 12 598
13 11 600
8 12 26
8 3 325
18 17 329
9 15 961
12 6 110
8 12 756
8 6 415
19 11 159
8 6 595
6 6 32
10 15 573
18 9 659
2 16 685
11 15 881
10 11 614
20 8 941
12 17 473
12 20 796
17 12 881
13 4 870
5 1 76
19 3 191
17 8 698
7 20 ...

output:

685
796
685
659
614
622
796
685
615
685
622
-1
-1
622
622
622
622
796
685
614
622
622
796
602
685
615
615
796
-1
622
796
685
659
614
685
659
614
685
685
685
685
659
-1
685
685
685
685
796
685
685
-1
685
598
796
685
796
796
622
-1
685
685
622
685
622
622
615
622
685
-1
-1
-1
685
796
615
615
796
685
7...

result:

ok 80 numbers

Test #6:

score: 0
Accepted
time: 1ms
memory: 12100kb

input:

30 60
20 6 610
28 8 847
1 9 442
30 5 574
5 23 49
12 17 415
3 24 116
3 22 164
3 16 464
27 1 179
19 11 689
16 8 840
12 28 242
13 14 300
20 21 243
6 7 50
10 28 207
27 2 858
5 17 164
27 19 839
28 25 399
10 11 185
6 10 157
24 8 309
2 22 722
5 4 688
13 19 314
10 15 858
13 22 286
12 24 376
29 17 37
7 4 762...

output:

526
513
513
513
464
526
442
513
526
513
526
526
526
526
513
376
513
526
526
526
513
513
526
513
498
526
464
526
498
394
526
526
526
526
526
526
498
526
526
526
526
526
526
526
442
498
526
513
526
526
513
526
513
526
513
526
513
513
513
376
526
442
513
513
513
415
464
415
498
513
526
498
498
464
513
...

result:

ok 120 numbers

Test #7:

score: 0
Accepted
time: 1ms
memory: 12088kb

input:

40 80
12 19 34
3 23 7
2 6 779
20 14 464
14 38 950
39 1 46
14 13 18
17 16 736
4 35 816
9 13 507
27 38 18
1 3 905
29 9 628
3 32 740
37 3 410
23 33 428
19 8 69
38 34 501
35 31 446
9 7 831
34 21 33
14 7 133
9 24 545
18 9 247
20 6 10
19 24 176
4 30 780
14 15 108
1 10 263
17 38 748
38 2 894
36 28 556
2 7 ...

output:

556
545
412
-1
-1
464
545
556
464
545
464
556
-1
295
545
424
556
545
545
365
464
545
556
556
412
556
412
464
464
556
545
464
545
464
-1
556
556
464
464
424
-1
410
-1
-1
-1
556
545
295
464
545
556
412
464
545
464
545
-1
545
-1
295
545
545
464
545
-1
545
-1
556
558
410
-1
464
545
464
464
-1
-1
424
-1
...

result:

ok 160 numbers

Test #8:

score: 0
Accepted
time: 0ms
memory: 12080kb

input:

50 100
33 19 845
50 31 685
27 25 461
15 36 18
17 35 853
49 32 539
7 6 840
24 8 1013
26 31 438
25 29 943
7 17 547
9 4 976
43 50 94
10 23 938
46 47 649
13 6 894
42 20 854
16 27 51
17 4 690
6 18 456
37 8 44
12 35 681
18 43 306
47 24 882
38 46 91
27 29 998
13 22 894
31 18 1010
42 27 165
9 2 75
6 19 588
...

output:

512
674
-1
701
544
541
572
572
572
674
572
572
541
572
544
544
544
588
853
572
572
572
572
572
572
539
572
572
572
544
-1
572
541
572
544
572
572
541
572
674
544
588
588
544
588
544
572
853
572
507
572
674
714
674
572
714
853
732
572
732
572
512
588
541
544
572
544
714
572
572
-1
853
541
544
541
572...

result:

ok 200 numbers

Test #9:

score: -100
Wrong Answer
time: 1ms
memory: 10096kb

input:

60 120
34 41 6
4 31 444
54 5 918
58 8 474
6 44 453
43 52 497
43 59 354
25 40 189
26 23 273
19 42 977
6 1 296
55 56 716
22 21 116
22 46 392
52 7 103
10 26 502
60 39 358
14 20 646
48 4 772
17 29 759
11 40 781
3 8 637
21 46 886
28 21 181
7 48 425
36 40 2
43 33 803
59 21 859
36 28 548
4 9 951
57 13 170
...

output:

525
611
358
-1
524
679
562
474
611
525
358
525
-1
951
735
348
611
358
591
358
425
340
764
524
524
918
591
348
525
764
524
524
525
524
524
525
611
951
524
524
524
951
524
735
358
918
591
951
525
358
524
525
-1
348
764
524
951
524
524
524
-1
764
348
525
759
340
951
679
759
951
348
524
524
716
358
524
...

result:

wrong answer 3rd numbers differ - expected: '386', found: '358'