QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#781559#5277. Limited SwapsZhaoZiLongWA 1ms7684kbC++231.4kb2024-11-25 16:29:402024-11-25 16:29:41

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

5
1 3 5 2 4
3 5 1 4 2

output:

3
1 2 4 

result:

ok OK, found solution, n = 5, ops = 3

Test #2:

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

input:

4
1 2 3 4
4 3 2 1

output:

-1

result:

ok OK, no solution

Test #3:

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

input:

1
1
1

output:

0


result:

ok OK, found solution, n = 1, ops = 0

Test #4:

score: -100
Wrong Answer
time: 1ms
memory: 5700kb

input:

2
1 2
2 1

output:

1
1 

result:

wrong answer Trying to swap elements 1 and 2 on 0-based indices 0 and 1 on step 0