QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#226473#7524. A Challenge For a Touristucup-team1881WA 1ms3872kbC++203.7kb2023-10-25 23:34:562023-10-25 23:34:56

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3764kb

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: 0ms
memory: 3760kb

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

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

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: 0ms
memory: 3636kb

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

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

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:

-1
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
3...

result:

wrong answer 1st numbers differ - expected: '556', found: '-1'