QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#415021#1817. AND PermutationPrinceton_TigersRE 50ms23924kbC++175.0kb2024-05-20 08:15:002024-05-20 08:15:01

详细

Test #1:

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

input:

6
0
1
4
5
2
6

output:

4
6
0
2
5
1

result:

ok OK!

Test #2:

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

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
24
85
214
146
238
43
311
38
314
51
122
0
144
158
168
41
47
195
337
83
28
261
76
10
323
388
82
384
319
62
57
52
290
272
303
9
30
288
283
32
206
277
63
291
304
182
420
174
145
416
194
142
269
112
302
58
188
98
35
210
202
267
281
250
130
257
149
317
215
236
198
135
305
297
422
131
4
31
21
25...

result:

ok OK!

Test #3:

score: 0
Accepted
time: 50ms
memory: 23924kb

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:

65827
41094
4867
71203
73506
82056
20992
39808
72480
126336
65570
3176
55953
6817
4227
38144
5762
66312
68804
24960
75360
58502
5922
37889
2321
137
7043
3244
18528
18856
74000
67588
1697
33828
58768
68736
68865
19688
2050
17632
60544
44177
320
4228
102657
85137
38912
12452
40707
33796
1288
1038
1843...

result:

ok OK!

Test #4:

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

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: 46ms
memory: 23596kb

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:

18820
16465
17104
25089
22017
2104
2516
29717
2501
548
25
961
16544
25409
24896
10416
15377
114
20000
30244
8322
17968
2632
6704
17236
11824
19345
8725
29716
27276
16908
26705
3121
9093
11700
27605
4680
1536
2072
7184
8853
2232
512
2753
27684
14901
561
10900
27168
25652
9504
17940
15872
12304
16469
...

result:

ok OK!

Test #6:

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

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: -100
Runtime Error

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
38
394
271
137
290
11
155
0

result: