QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#76479#5272. Greatest Common DivisorLHTL 27ms3336kbC++232.0kb2023-02-10 03:03:152023-02-10 03:03:16

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3256kb

input:

10 13
1
2
3
4
5
6
7
8
9
10
11
12
13

output:

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

result:

ok 26 numbers

Test #2:

score: 0
Accepted
time: 2ms
memory: 3272kb

input:

1 1
1

output:

-1 -1

result:

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

Test #3:

score: 0
Accepted
time: 3ms
memory: 3276kb

input:

5 100
2
20
17
14
23
19
8
10
21
19
16
16
19
16
6
11
9
12
5
12
21
8
15
5
24
5
5
17
6
12
1
21
25
3
20
8
7
11
15
8
6
1
16
25
14
1
11
13
11
20
6
2
5
7
3
6
19
20
3
22
21
11
13
18
18
14
2
1
19
3
20
23
3
16
1
8
14
16
11
9
10
17
22
3
8
12
2
12
9
5
18
6
9
25
6
12
19
14
16
6

output:

3 3
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
5 5
-1 -1
-1 -1
-1 -1
-1 -1
5 5
-1 -1
5 5
5 5
-1 -1
-1 -1
-1 -1
2 2
-1 -1
-1 -1
4 2
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
2 2
-1 -1
-1 -1
-1 -1
2 2
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
3 3
5 5
-1 -...

result:

ok 200 numbers

Test #4:

score: 0
Accepted
time: 4ms
memory: 3336kb

input:

20 100
289
374
235
204
189
215
84
194
242
331
216
326
264
113
181
344
124
91
39
189
256
77
228
155
201
52
386
31
384
397
267
282
226
249
400
208
48
176
131
296
288
266
75
367
298
311
388
165
11
121
44
269
325
293
392
210
365
150
221
365
188
298
23
192
223
179
245
286
103
118
314
352
394
255
78
225
4...

output:

-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
10 4
-1 -1
-...

result:

ok 200 numbers

Test #5:

score: 0
Accepted
time: 27ms
memory: 3268kb

input:

100 10000
6612
4694
4970
8529
7165
1355
9979
3049
2281
9998
5330
6674
5280
7838
729
810
5836
1465
5805
5812
5933
9493
7134
2581
3173
9673
2322
2776
3053
1377
9601
1547
1902
93
3114
5408
7577
8994
8173
189
6672
3431
2832
4764
6650
6842
379
7307
1283
7753
6203
1229
1849
297
9026
6520
9568
4419
5093
81...

output:

-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
57 57
-1 -1
-1 -1
-1 -1
-1 -1
-1 -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 20000 numbers

Test #6:

score: -100
Time Limit Exceeded

input:

1000 200000
134451
18536
303685
537674
428477
446829
583452
904095
295077
864453
949776
744108
144837
500318
596486
214710
338668
667766
679253
603928
158044
947810
272203
572606
767501
295561
508775
629483
950313
206695
394144
959539
932878
230667
676892
318913
642959
274136
662458
834771
792627
36...

output:

-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
...

result: