QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#415014#1817. AND PermutationPrinceton_TigersRE 45ms23844kbC++173.2kb2024-05-20 07:48:112024-05-20 07:48:11

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

6
0
1
4
5
2
6

output:

4
6
0
2
5
1

result:

ok OK!

Test #2:

score: 0
Accepted
time: 6ms
memory: 22804kb

input:

272
315
138
126
6
394
297
44
273
84
200
9
197
396
133
16
46
65
87
86
336
316
174
140
162
250
306
52
188
57
36
63
192
320
388
10
156
15
208
38
32
31
228
30
305
234
384
220
142
72
27
337
110
94
317
304
242
398
209
5
323
29
284
301
309
244
230
261
61
254
266
194
296
275
313
80
206
214
88
308
18
288
106...

output:

196
308
129
32
85
214
83
238
42
311
98
314
114
50
38
272
158
288
41
47
195
337
82
28
261
141
266
323
390
19
384
319
62
122
5
67
176
303
16
6
256
283
1
206
277
63
291
49
182
292
174
145
416
194
78
269
112
302
10
188
418
3
210
202
267
281
250
130
257
52
317
215
236
198
39
305
297
422
138
132
87
149
25...

result:

ok OK!

Test #3:

score: 0
Accepted
time: 45ms
memory: 23608kb

input:

5134
36416
73248
85220
2072
16524
36385
101507
91137
17604
22
640
70530
66850
107792
81952
163
84260
46246
45090
101411
18824
66360
116881
400
50338
109824
17508
122881
98691
99843
36481
1696
102658
27008
2566
4
32900
103171
1153
104706
69923
82280
19616
66849
17540
36870
8352
117777
82156
6785
6780...

output:

74129
452
4867
83364
101665
82052
9008
2472
35618
109953
258
35873
51216
18656
1793
43264
4288
18961
85388
4992
103458
62598
5922
99329
65800
21121
108944
7554
11808
18832
74000
65809
3744
99872
83400
65696
6178
19684
544
9361
36496
46212
65796
35520
71714
82408
38401
12454
40707
98594
1283
66088
32...

result:

ok OK!

Test #4:

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

input:

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

output:

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

result:

ok OK!

Test #5:

score: 0
Accepted
time: 32ms
memory: 23844kb

input:

3237
9776
12036
8229
2100
10676
17349
26144
2690
30256
3088
27328
31796
3344
54
3637
16908
17030
31749
8593
153
20020
2305
24980
17413
1155
16524
1068
16576
2881
1139
10416
1924
17284
1042
16969
1066
28084
24608
29220
25125
19744
26117
128
28724
4760
17792
27008
17696
4372
6784
19157
8577
405
19072
...

output:

16773
20688
23056
25472
521
10242
6165
25653
2501
25088
1075
961
25284
28416
24712
11408
13361
848
24068
27424
12289
25300
6752
14896
20820
11025
31249
8469
25780
19084
17217
26705
11312
965
11700
27605
4680
524
2449
1296
8853
336
16
705
27940
14901
53
10901
25121
24884
40
19988
29216
1060
20501
123...

result:

ok OK!

Test #6:

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

input:

32
21
10
13
29
15
30
14
0
26
19
18
2
8
25
5
23
17
12
24
3
4
22
20
27
6
9
1
28
7
16
11
31

output:

10
21
18
2
16
1
17
31
5
12
13
29
23
6
26
8
14
19
7
28
27
9
11
4
25
22
30
3
24
15
20
0

result:

ok OK!

Test #7:

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

input:

286
304
63
445
257
143
170
407
68
55
44
256
53
176
310
4
436
356
33
6
442
160
38
314
273
296
420
299
173
64
408
0
401
169
423
40
284
135
187
358
397
301
70
260
393
190
174
36
428
65
183
421
21
390
58
28
73
288
434
403
104
10
405
443
168
46
43
171
47
398
311
185
279
413
15
277
23
19
20
42
261
278
139...

output:

143
384
66
190
304
277
104
443
392
403
48
394
271
137
34
11
155
8
288
5
287
9
133
174
151
27
148
274
447
39
32
46
278
88
260
163
312
324
153
50
146
441
40
54
257
273
17
19
446
264
26
426
121
389
419
438
6
13
44
407
437
42
68
279
401
404
276
400
113
136
326
168
98
432
170
424
428
427
405
186
169
308
...

result:

ok OK!

Test #8:

score: -100
Runtime Error

input:

260
261
790
778
536
273
7
28
19
840
12
3
527
75
4
599
795
336
543
793
82
850
286
852
2
848
539
841
587
847
326
535
515
519
837
86
78
322
271
525
80
785
22
596
523
794
95
81
339
70
798
590
67
333
69
834
284
21
540
30
72
789
581
514
8
26
27
11
1024
594
770
257
348
279
861
331
73
600
264
277
577
6
345
...

output:

602
73
85
327
590
856
835
844
0

result: