Task: | Merkkijono |
Sender: | Kameli |
Submission time: | 2018-01-18 13:53:14 +0200 |
Language: | Python3 |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.08 s | details |
#2 | WRONG ANSWER | 0.07 s | details |
#3 | WRONG ANSWER | 0.07 s | details |
#4 | WRONG ANSWER | 0.07 s | details |
#5 | WRONG ANSWER | 0.08 s | details |
Code
a=list(input()) c=25 chars='ABCDEFGHIJKLMNOPQRSTUVWXYZ' op=[] i=0 while a!=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ'): print("".join(a),i,c) if c==-25: #print("".join(a)) #op.append("SWAP") #a[0],a[1]=a[1],a[0] break if a[1]==chars[c]: op.append("SWAP") a[0],a[1]=a[1],a[0] a=[a[25]]+a[0:25] op.append("MOVE") if a[0]==chars[c-1]: a=[a[25]]+a[0:25] op.append("MOVE") c-=1 #print("".join(a),i,c) i+=1 print(len(op)) #print("".join(a),i,c) #exit() #input() for i in op: print(i)
Test details
Test 1
Verdict: ACCEPTED
input |
---|
ABCDEFGHIJKLMNOPQRSTUVWXYZ |
correct output |
---|
0 |
user output |
---|
0 |
Test 2
Verdict: WRONG ANSWER
input |
---|
ZYXWVUTSRQPONMLKJIHGFEDCBA |
correct output |
---|
923 MOVE MOVE SWAP MOVE ... |
user output |
---|
ZYXWVUTSRQPONMLKJIHGFEDCBA 0 2... |
Test 3
Verdict: WRONG ANSWER
input |
---|
RPJMFWBHYQOTXUAENLDGZISCVK |
correct output |
---|
611 SWAP MOVE MOVE SWAP ... |
user output |
---|
RPJMFWBHYQOTXUAENLDGZISCVK 0 2... |
Test 4
Verdict: WRONG ANSWER
input |
---|
GWJSPBHANMXYFLKIDORVUCEZQT |
correct output |
---|
659 MOVE SWAP MOVE SWAP ... |
user output |
---|
GWJSPBHANMXYFLKIDORVUCEZQT 0 2... |
Test 5
Verdict: WRONG ANSWER
input |
---|
BJYNFLKEIUCZMQHRAXOGWPSDTV |
correct output |
---|
624 MOVE SWAP MOVE SWAP ... |
user output |
---|
BJYNFLKEIUCZMQHRAXOGWPSDTV 0 2... |