QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#333973#3349. Train Ticketslmq26052003AC ✓22ms3704kbC++205.1kb2024-02-20 22:05:532024-02-20 22:05:54

详细

Test #1:

score: 100
Accepted
time: 22ms
memory: 3704kb

input:

99
3 1
3 4
2
0 0
0
0 0
0
3 3
4 6
1
5 5
5
2 1
2
3 8
3 4
5
3 4
4
0 1
0
4 10
3 6 12
4 8
5
3 5 2
5 1
4
3 4 1
1 1
5
4 27
325 520 259
149 2
394
4 10 8
0 9
1
5 3 2
20 2
11
16 24
983 876 540 649 171 649 687 153 818 118 978 756 950 712 481
630 643 857 248 172 907 880 246 833 757 538 457 44 587
865 460 314 25...

output:

0
0
41
33
1694
107336
5543
36445
87345
147087
47446
204476
35039
32496
252637
24761
183950
570439
11036
22946
540720
761214
691731
248771
404837
31980
42717
330442
272371
66587
26277
81156
201684
69860
278605
43457
281122
86103
156208
373806
161039
468283
122315
328097
58923
179081
39894
106519
3654...

result:

ok 99 lines