QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#139388#3278. 算术slime#15 1ms3792kbC++14893b2023-08-13 11:33:042024-07-04 01:40:53

詳細信息

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

10 3
10
7
13
4
17
28
29
13
4
30

output:

-1
-1
-1
-1
2
-1
2
-1
-1
-1

result:

ok 10 numbers

Test #2:

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

input:

10 3
17
21
29
8
25
21
8
14
26
7

output:

2
-1
2
2
-1
-1
2
2
2
-1

result:

ok 10 numbers

Test #3:

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

input:

10 2
14
12
20
12
7
4
6
12
16
13

output:

-1
-1
-1
-1
1
-1
-1
-1
-1
1

result:

ok 10 numbers

Subtask #2:

score: 5
Accepted

Dependency #1:

100%
Accepted

Test #4:

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

input:

10 4
10
10
39
26
20
30
23
13
17
27

output:

-1
-1
2
-1
-1
-1
2
-1
-1
2

result:

ok 10 numbers

Test #5:

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

input:

10 5
13
45
45
36
46
30
47
6
15
16

output:

1
-1
-1
-1
-1
-1
1
-1
-1
-1

result:

ok 10 numbers

Test #6:

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

input:

10 6
8
31
37
22
29
7
44
12
29
32

output:

-1
-1
-1
-1
2
-1
-1
-1
2
-1

result:

ok 10 numbers

Test #7:

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

input:

10 7
27
34
12
18
36
57
21
61
27
25

output:

2
2
2
-1
-1
-1
-1
2
2
-1

result:

ok 10 numbers

Test #8:

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

input:

10 8
36
58
52
78
43
42
51
40
18
27

output:

-1
-1
-1
-1
-1
-1
-1
-1
-1
-1

result:

ok 10 numbers

Test #9:

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

input:

10 9
53
26
68
54
24
81
29
13
71
71

output:

2
2
2
-1
-1
-1
2
-1
2
2

result:

ok 10 numbers

Test #10:

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

input:

10 10
67
43
20
39
55
51
47
62
87
100

output:

1
1
-1
2
-1
-1
1
-1
1
-1

result:

ok 10 numbers

Subtask #3:

score: 5
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #11:

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

input:

100 97
180
581
305
712
315
861
922
484
175
519
943
365
547
142
770
114
182
452
746
290
158
583
185
600
609
412
523
397
227
839
604
387
116
621
914
640
324
678
221
938
709
677
876
678
213
653
581
903
299
287
860
765
672
180
399
907
814
969
934
956
820
864
235
848
815
367
241
737
674
417
856
404
291
4...

output:

47
2
47
3
11
7
23
2
15
15
7
47
2
15
5
47
7
3
15
2
-1
-1
11
7
7
11
47
11
3
15
1
2
15
47
47
47
3
2
7
23
15
23
23
2
15
47
2
15
7
11
47
23
47
47
23
15
47
2
-1
47
23
11
47
23
47
47
3
47
47
47
47
5
-1
47
3
15
47
47
15
2
15
23
47
2
11
5
1
47
47
2
15
2
47
47
47
3
47
2
23
15

result:

ok 100 numbers

Test #12:

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

input:

100 91
851
144
363
247
607
696
363
691
883
394
118
371
360
787
879
868
168
103
842
706
414
746
540
702
217
817
497
573
822
395
108
384
551
620
436
374
340
907
855
181
849
661
580
707
726
513
749
636
812
454
874
227
472
315
791
806
752
909
188
690
664
547
657
153
138
171
587
419
430
731
349
512
904
7...

output:

-1
-1
2
-1
-1
-1
2
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
2
-1
2
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
2
-1
-1
-1
-1
2
-1
-1
-1
2
-1
-1
-1
-1
-1
-1
-1
2
-1
2
-1
-1
2
-1
-1
-1
-1
2
-1
-1
-1
-1
-1
2
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
2
-1
2
-1
-1
2
-1
-1
-1
-1
-1
-1
-1
-1
-1
2
-1
-1

result:

ok 100 numbers

Test #13:

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

input:

100 81
85
543
544
188
666
539
270
161
666
323
221
522
512
207
622
762
284
740
143
397
265
774
419
370
344
163
214
214
501
262
436
328
647
754
453
161
416
809
723
229
496
735
357
478
242
161
227
389
188
325
382
134
463
736
325
329
231
102
623
553
728
445
460
636
416
646
637
221
219
436
695
298
161
87...

output:

-1
-1
-1
2
-1
2
-1
2
-1
2
26
-1
2
-1
-1
-1
26
26
8
-1
-1
-1
26
-1
26
-1
-1
-1
-1
-1
-1
-1
2
-1
-1
2
26
2
-1
-1
-1
-1
-1
-1
2
2
26
26
2
-1
-1
2
-1
-1
-1
26
-1
-1
26
-1
2
-1
-1
-1
26
-1
-1
26
-1
-1
26
-1
2
-1
8
2
-1
-1
2
-1
-1
-1
-1
-1
26
-1
2
-1
-1
26
-1
-1
26
-1
26
26
-1
2
-1
-1

result:

ok 100 numbers

Test #14:

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

input:

100 100
738
253
417
420
523
537
778
736
670
839
957
849
419
768
796
772
493
269
631
615
606
484
445
701
324
586
601
690
439
249
221
372
648
999
682
202
889
231
386
179
399
414
487
480
349
436
470
749
549
149
779
707
440
737
467
449
483
803
900
459
549
972
979
949
604
244
553
509
269
784
721
387
427
...

output:

-1
-1
-1
-1
-1
-1
-1
-1
-1
4
-1
-1
4
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
4
-1
-1
-1
-1
2
-1
-1
-1
-1
-1
4
2
-1
-1
-1
-1
-1
-1
-1
-1
-1
4
-1
-1
-1
-1
-1
-1
-1
-1
4
-1
-1
4
-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
2
-1
-1
-1
-1
4
-1
-1
-1
-1
-1
-1

result:

ok 100 numbers

Test #15:

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

input:

100 71
261
626
313
283
308
396
681
76
354
297
425
355
649
399
166
201
368
671
671
72
227
248
372
641
239
697
567
424
78
238
403
457
129
384
246
357
346
496
581
279
177
503
682
392
338
656
98
564
674
562
364
567
521
304
145
457
669
421
677
694
241
535
354
354
109
511
446
209
285
355
496
645
449
273
3...

output:

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

result:

ok 100 numbers

Test #16:

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

input:

100 91
405
173
240
151
729
826
614
533
292
878
272
184
613
170
632
215
836
320
437
240
837
612
243
527
492
762
818
734
139
166
355
228
790
419
808
365
181
254
277
884
683
174
546
870
170
280
818
624
596
701
483
854
421
638
766
885
634
361
634
242
519
902
834
316
558
392
710
791
719
570
465
667
599
8...

output:

-1
2
-1
-1
-1
-1
-1
-1
-1
-1
2
-1
-1
-1
-1
-1
2
-1
-1
-1
-1
-1
-1
-1
-1
-1
2
-1
-1
2
2
-1
2
-1
-1
-1
2
-1
-1
-1
-1
-1
-1
-1
-1
-1
2
-1
-1
-1
-1
-1
-1
-1
2
-1
-1
-1
-1
-1
-1
-1
-1
-1
2
-1
-1
-1
2
-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
2
-1
-1
-1
-1
-1

result:

ok 100 numbers

Test #17:

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

input:

100 67
329
142
107
81
244
378
571
198
307
141
547
206
488
342
107
639
358
589
127
315
509
551
501
347
388
268
550
131
351
526
102
541
270
669
588
378
195
209
638
228
212
527
231
350
506
178
374
164
320
401
129
413
504
669
155
445
518
659
151
239
126
303
535
102
237
334
566
220
309
633
133
362
200
26...

output:

32
10
-1
-1
10
10
-1
-1
-1
32
32
10
-1
32
-1
-1
-1
10
-1
-1
-1
-1
32
32
10
-1
-1
-1
-1
32
-1
10
32
2
10
10
32
10
-1
10
32
10
2
-1
-1
32
-1
2
10
2
-1
32
-1
2
-1
10
-1
-1
-1
2
-1
-1
2
-1
-1
2
2
-1
32
2
2
10
2
2
32
10
2
-1
32
-1
2
2
10
32
2
10
-1
10
32
-1
-1
10
32
-1
32
2
32
10
32
-1

result:

ok 100 numbers

Test #18:

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

input:

100 50
437
346
112
103
466
381
454
423
206
353
166
74
357
58
479
480
372
303
99
325
180
490
341
56
425
169
359
450
200
99
199
299
432
324
339
328
419
72
322
86
247
51
277
455
71
239
380
438
448
158
293
246
489
58
251
460
109
399
172
350
123
425
456
118
199
246
139
199
221
425
440
475
142
450
257
349...

output:

9
-1
-1
9
-1
-1
-1
9
-1
9
-1
-1
1
-1
4
-1
-1
9
2
-1
-1
-1
-1
-1
-1
4
4
-1
-1
2
2
2
-1
-1
4
-1
4
-1
-1
-1
9
-1
9
-1
-1
4
-1
-1
-1
-1
1
-1
4
-1
-1
-1
4
2
-1
-1
9
-1
-1
-1
2
-1
4
2
-1
-1
-1
-1
-1
-1
1
2
2
4
-1
4
9
-1
2
-1
9
-1
-1
-1
9
-1
9
-1
2
4
-1
-1
9
1
-1
-1

result:

ok 100 numbers

Test #19:

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

input:

100 24
180
159
233
75
236
31
147
81
175
180
119
117
79
175
204
182
137
123
36
127
132
125
175
239
128
188
240
32
139
105
175
183
171
107
56
206
58
125
95
182
33
49
215
135
62
223
77
199
145
65
103
125
214
154
87
47
29
175
52
178
92
150
31
32
209
134
220
92
217
74
35
223
128
215
234
127
239
112
141
6...

output:

-1
-1
-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
2
-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
-1
2
-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

result:

ok 100 numbers

Subtask #4:

score: 0
Wrong Answer

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #20:

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

input:

100 6007
47209
17765
12070
33936
9456
46389
53980
47081
33569
12604
9471
53986
30034
23277
45832
42538
42048
16651
8020
57713
18099
10847
36498
53379
48899
46111
27949
35995
19980
36681
43053
30147
13279
42048
54141
14304
22364
24027
47979
45448
8046
46884
34366
44206
42127
49959
27880
37359
17772
3...

output:

-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
2
2
-1
-1
-1
2
-1
-1
-1
2
76
-1
-1
-1
12
-1
-1
76
-1
-1
-1
-1
2
2
-1
90
2
2
32
-1
-1
-1
-1
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
-1
-1
-1
-1
76
-1
2
-1
-1
-1
-1
-1
-1
90
2
-1
-1
-1
-1
-1
2
-1
-1
-1
-1
2
-1
-1
-1

result:

wrong answer 2nd numbers differ - expected: '1000', found: '-1'

Subtask #5:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%

Subtask #6:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%

Subtask #7:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%

Subtask #8:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%

Subtask #9:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%

Subtask #10:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%