CSES - Datatähti 2018 loppu - Results
Submission details
Task:Merkkijono
Sender:Kameli
Submission time:2018-01-18 13:09:24 +0200
Language:Python3
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#1ACCEPTED0.07 sdetails
#20.06 sdetails
#30.07 sdetails
#40.06 sdetails
#50.07 sdetails

Code

a=list(input())
c=0
while a!=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ'):
    for i in range(25):
        if a[i]>a[i+1]:
            a[i],a[i+1]=a[i+1],a[i]
            c+=1
print(c)
for i in range(c):
    print("SWAP")

Test details

Test 1

Verdict: ACCEPTED

input
ABCDEFGHIJKLMNOPQRSTUVWXYZ

correct output
0

user output
0

Test 2

Verdict:

input
ZYXWVUTSRQPONMLKJIHGFEDCBA

correct output
923
MOVE
MOVE
SWAP
MOVE
...

user output
325
SWAP
SWAP
SWAP
SWAP
...

Test 3

Verdict:

input
RPJMFWBHYQOTXUAENLDGZISCVK

correct output
611
SWAP
MOVE
MOVE
SWAP
...

user output
171
SWAP
SWAP
SWAP
SWAP
...

Test 4

Verdict:

input
GWJSPBHANMXYFLKIDORVUCEZQT

correct output
659
MOVE
SWAP
MOVE
SWAP
...

user output
143
SWAP
SWAP
SWAP
SWAP
...

Test 5

Verdict:

input
BJYNFLKEIUCZMQHRAXOGWPSDTV

correct output
624
MOVE
SWAP
MOVE
SWAP
...

user output
132
SWAP
SWAP
SWAP
SWAP
...