QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#522693#8064. Gas Stationgym#RE 24ms146716kbC++144.6kb2024-08-17 11:24:472024-08-17 11:24:49

详细

Test #1:

score: 100
Accepted
time: 12ms
memory: 144440kb

input:

1 4
1 9 L
2 5 L
3 10 L
4 10 L

output:

10
7
17
27

result:

ok 4 lines

Test #2:

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

input:

1 4
1 9 L
2 9 L
3 10 L
4 10 L

output:

10
11
21
21

result:

ok 4 lines

Test #3:

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

input:

1 2
8 11 R
9 10 L

output:

19
19

result:

ok 2 lines

Test #4:

score: 0
Accepted
time: 15ms
memory: 145172kb

input:

2 10
1 10 R
2 3 R
3 10 R
4 12 R
5 1 R
6 5 R
7 10 R
10 2 R
11 7 R
13 4 R

output:

11
5
13
16
6
11
21
18
18
22

result:

ok 10 lines

Test #5:

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

input:

4 8
3 9 R
5 6 R
6 2 L
8 2 L
9 6 R
10 10 R
12 3 R
14 3 L

output:

12
11
8
10
15
20
15
17

result:

ok 8 lines

Test #6:

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

input:

2 10
1 1 L
2 7 L
3 6 L
4 10 L
5 7 L
6 1 L
7 6 L
8 1 L
9 4 L
10 1 L

output:

2
9
9
14
12
10
18
10
14
11

result:

ok 10 lines

Test #7:

score: 0
Accepted
time: 15ms
memory: 146632kb

input:

2 9
1 10 R
2 9 R
3 10 R
4 6 R
5 5 R
6 8 R
7 1 L
8 5 L
9 1 R

output:

11
11
13
10
16
18
8
13
12

result:

ok 9 lines

Test #8:

score: 0
Accepted
time: 15ms
memory: 146516kb

input:

1 9
2 2 R
6 6 R
10 4 L
12 2 R
13 5 L
17 5 R
21 3 L
23 9 R
27 9 R

output:

4
12
14
14
18
22
24
32
36

result:

ok 9 lines

Test #9:

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

input:

1 10
2 6 R
3 5 L
5 5 R
8 10 L
10 1 L
12 3 L
15 4 R
16 4 L
18 9 L
20 1 L

output:

8
8
10
18
11
15
19
20
29
21

result:

ok 10 lines

Test #10:

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

input:

2 9
1 9 R
2 1 R
3 7 R
4 5 R
5 5 R
6 7 R
7 1 R
8 1 R
9 7 R

output:

10
3
10
9
10
17
11
11
17

result:

ok 9 lines

Test #11:

score: 0
Accepted
time: 16ms
memory: 143232kb

input:

2 237
8 96 R
22 85 R
36 15 R
48 47 R
56 50 R
69 30 R
79 59 R
89 53 R
97 3 R
101 76 R
105 25 R
117 38 R
119 73 R
136 83 L
151 24 R
152 67 R
157 87 R
159 20 R
168 63 L
183 32 R
198 26 R
202 24 R
206 6 R
209 99 R
222 42 L
223 31 R
240 18 R
253 92 R
254 77 R
267 38 R
269 81 R
284 31 R
288 59 R
293 89 R
...

output:

104
107
51
95
157
125
166
148
151
224
191
204
277
219
248
291
378
224
231
256
282
315
288
381
264
412
333
425
458
496
506
489
548
514
526
644
387
568
603
583
365
553
639
565
641
725
650
759
703
767
760
815
875
914
843
1008
960
596
900
848
909
1015
1104
1028
1007
1039
959
983
1086
1054
1125
1070
1198...

result:

ok 237 lines

Test #12:

score: 0
Accepted
time: 24ms
memory: 143828kb

input:

1 989
16 43 R
19 65 L
24 24 R
25 86 L
51 96 L
81 31 L
98 80 L
104 69 L
126 55 L
133 62 R
156 90 L
161 87 L
175 59 L
196 49 R
211 18 L
239 85 L
245 51 L
266 33 R
279 77 L
293 14 L
315 88 R
326 97 R
339 19 L
366 5 L
374 9 L
397 82 L
409 23 L
433 55 L
442 5 L
452 78 R
472 34 L
478 88 L
504 57 R
505 67 ...

output:

59
84
48
111
207
142
222
291
277
195
367
454
426
245
444
529
580
299
606
620
403
423
625
630
634
716
657
712
717
530
751
805
561
872
888
907
911
614
937
963
969
1033
1078
1089
1158
826
1118
1179
1269
1182
1184
898
919
1277
1292
1303
1374
1023
1388
1421
1415
1138
1488
1560
1571
1626
1620
1718
1781
17...

result:

ok 989 lines

Test #13:

score: 0
Accepted
time: 16ms
memory: 143684kb

input:

6 708
24 42 L
56 52 L
87 96 L
103 92 L
122 90 R
147 64 R
176 93 R
217 57 L
264 51 R
292 70 L
314 40 L
321 62 L
341 88 L
381 16 L
413 28 L
433 4 L
434 63 L
469 8 R
499 60 L
533 60 R
536 47 R
556 63 L
601 35 L
604 27 L
637 32 L
675 1 L
687 52 R
727 86 L
751 43 R
793 41 L
829 84 L
863 22 R
891 24 L
939...

output:

66
108
183
195
212
211
269
274
315
362
354
383
429
397
441
437
497
477
559
593
583
619
636
631
669
676
739
813
794
834
913
885
915
970
1034
1004
1065
1096
1085
1102
1147
1132
1253
1246
1223
1252
1315
1292
1286
1351
1373
1444
1498
1506
1456
1538
1492
1614
1586
1610
1655
1699
1711
1715
1755
1771
1775
...

result:

ok 708 lines

Test #14:

score: -100
Runtime Error

input:

7 482
4 25 L
10 12 R
16 91 L
20 96 R
21 48 R
24 73 L
28 56 R
30 56 L
36 40 R
40 49 R
45 15 L
48 85 R
49 84 L
55 92 L
61 8 L
66 33 L
70 43 L
73 48 L
77 64 L
82 71 L
86 86 R
90 69 L
95 87 L
101 85 R
105 46 R
109 80 L
112 70 L
113 19 L
117 28 L
123 56 L
125 48 L
126 53 R
130 55 R
131 28 R
132 86 L
137 ...

output:


result: