QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#415016#1817. AND PermutationPrinceton_TigersRE 56ms24552kbC++173.9kb2024-05-20 07:53:332024-05-20 07:53:35

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 5ms
memory: 22592kb

input:

6
0
1
4
5
2
6

output:

4
6
0
2
5
1

result:

ok OK!

Test #2:

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

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
53
129
16
116
214
83
238
43
311
54
314
114
122
6
17
158
168
136
47
195
337
19
284
261
5
3
323
388
26
384
319
62
57
20
98
48
303
1
258
96
283
288
206
277
63
291
272
182
164
174
145
416
194
71
269
112
302
306
188
290
162
210
202
267
281
250
130
257
49
317
215
236
198
294
305
297
422
11
8
30
149
25...

result:

ok OK!

Test #3:

score: 0
Accepted
time: 56ms
memory: 24552kb

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:

65964
8465
41752
38051
106272
65988
9008
37282
100643
105761
33024
52240
55937
2280
1666
115968
38019
84296
85188
396
70689
62594
262
99330
65864
4264
104835
7586
7712
488
74016
69889
3745
67075
58769
66720
66593
19660
4098
9220
3792
44177
106753
6288
35073
67489
36352
9000
44305
66832
1030
66668
68...

result:

ok OK!

Test #4:

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

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: 45ms
memory: 23116kb

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:

20868
147
2640
896
1027
58
2448
29748
2182
25088
5141
961
25100
19137
25024
10288
11313
760
23076
20004
8577
26260
6689
10880
24916
11793
27281
10773
25780
27276
20740
24625
11312
18981
11700
27605
4680
592
1048
3472
8853
6288
8192
3585
26661
14901
597
10964
27329
8452
9504
20020
31232
1073
20501
82...

result:

ok OK!

Test #6:

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

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: 5ms
memory: 23544kb

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
49
394
271
137
290
11
155
6
33
5
287
9
133
174
151
27
148
274
447
39
32
46
278
88
1
163
312
324
153
50
146
441
41
54
257
273
24
19
446
264
26
426
121
389
419
438
8
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
29...

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
23
851
860
0

result: