CSES - Datatähti 2018 loppu - Results
Submission details
Task:Metsämetro
Sender:ufokurpitsa
Submission time:2018-01-18 14:30:55 +0200
Language:Python3
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
Test results
testverdicttimegroup
#10.07 s1details
#20.08 s1details
#30.07 s1details
#40.07 s1details
#50.08 s1details
#60.09 s1details
#70.08 s1details
#80.07 s1details
#90.08 s1details
#100.08 s1details
#110.08 s2details
#120.08 s2details
#130.07 s2details
#140.08 s2details
#150.07 s2details
#160.07 s2details
#170.08 s2details
#180.07 s2details
#190.06 s2details
#200.08 s2details
#210.08 s3details
#220.07 s3details
#230.08 s3details
#240.06 s3details
#250.08 s3details
#260.08 s3details
#270.07 s3details
#280.07 s3details
#290.08 s3details
#300.07 s3details

Code

d = {'A': 0,
     'B': 1,
     'C': 2,
     'D': 3,
     'E': 4,
     'F': 5,
     'G': 6,
     'H': 7,
     'I': 8,
     'J': 9,
     'K': 10,
     'L': 11,
     'M': 12,
     'N': 13,
     'O': 14,
     'P': 15,
     'Q': 16,
     'R': 17,
     'S': 18,
     'T': 19,
     'U': 20,
     'V': 21,
     'W': 22,
     'X': 23,
     'Y': 24,
     'Z': 25,
     }

s1 = input()
s = []
for c in s1:
    s.append(c)

i = 0
co = 0
m = []
while True:
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
        t = s[i]
        s[i] = s[(i+1)%26]
        s[(i+1)%26] = t
        m.append(True)
        co = 0
    else:
        m.append(False)
        co += 1
    if co == 25:
        break
    i = (i+1) %26

for i in range(26):
    if d.get(s[0]) == 0:
        break;
    m.append(False)

print(str(len(m)))      
for x in m:
    if x:
        print("SWAP")
    else:
        print("MOVE")
            

Test details

Test 1

Group: 1

Verdict:

input
10
9 4 9 7 6 10 4 6 2 9

correct output
9 31

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 2

Group: 1

Verdict:

input
10
5 6 3 5 6 3 4 7 1 10

correct output
10 25

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 3

Group: 1

Verdict:

input
10
10 2 4 1 4 9 6 3 5 10

correct output
10 24

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 4

Group: 1

Verdict:

input
10
7 5 1 3 8 4 5 4 6 3

correct output
7 22

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 5

Group: 1

Verdict:

input
10
10 7 8 4 10 6 8 6 2 3

correct output
10 29

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 6

Group: 1

Verdict:

input
10
1 2 8 2 3 1 3 1 4 9

correct output
9 17

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 7

Group: 1

Verdict:

input
10
2 8 2 5 8 8 5 10 9 7

correct output
7 31

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 8

Group: 1

Verdict:

input
10
2 10 4 8 10 10 9 3 9 7

correct output
8 34

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 9

Group: 1

Verdict:

input
10
10 7 9 1 7 8 4 4 1 5

correct output
10 27

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 10

Group: 1

Verdict:

input
10
1 4 7 7 3 1 10 6 4 3

correct output
5 23

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 11

Group: 2

Verdict:

input
100
5 3 4 7 5 1 7 1 6 10 2 9 6 5 9...

correct output
6 281

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 12

Group: 2

Verdict:

input
100
3 9 7 3 6 6 4 3 1 8 2 4 2 6 2 ...

correct output
7 252

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 13

Group: 2

Verdict:

input
100
8 2 3 4 8 3 2 7 10 10 3 2 3 4 ...

correct output
8 252

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 14

Group: 2

Verdict:

input
100
4 4 9 8 5 6 2 3 7 10 10 2 7 5 ...

correct output
9 261

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 15

Group: 2

Verdict:

input
100
7 3 3 5 10 6 6 8 10 5 5 8 3 5 ...

correct output
10 300

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 16

Group: 2

Verdict:

input
100
9 5 2 1 9 8 6 4 1 6 3 5 3 1 4 ...

correct output
9 289

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 17

Group: 2

Verdict:

input
100
9 7 5 5 4 1 9 2 3 5 10 2 10 5 ...

correct output
9 287

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 18

Group: 2

Verdict:

input
100
3 8 5 10 8 10 9 2 8 3 1 2 9 7 ...

correct output
6 282

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 19

Group: 2

Verdict:

input
100
6 3 9 2 8 7 8 4 6 4 4 10 2 10 ...

correct output
8 260

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 20

Group: 2

Verdict:

input
100
10 8 7 8 10 3 1 2 1 1 7 4 5 5 ...

correct output
10 279

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 21

Group: 3

Verdict:

input
100000
917855934 394938644 81692499 4...

correct output
917855934 23490295363738

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 22

Group: 3

Verdict:

input
100000
898177957 193852227 11785863 3...

correct output
898177957 23488890808371

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 23

Group: 3

Verdict:

input
100000
560743028 996665755 25721760 4...

correct output
576170439 23599624330076

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 24

Group: 3

Verdict:

input
100000
836491959 800539061 666447484 ...

correct output
836491959 23450143338851

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 25

Group: 3

Verdict:

input
100000
156445358 170997055 927078622 ...

correct output
930838017 23503313036290

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 26

Group: 3

Verdict:

input
100000
869942654 614144284 154904581 ...

correct output
869942654 23544105883410

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 27

Group: 3

Verdict:

input
100000
471025024 244072220 419574192 ...

correct output
657776925 23597080152723

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 28

Group: 3

Verdict:

input
100000
561299091 285120535 109702008 ...

correct output
862325964 23517085653307

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 29

Group: 3

Verdict:

input
100000
356879006 3017698 603259365 18...

correct output
499995467 23540251578008

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()

Test 30

Group: 3

Verdict:

input
100000
190109479 83895435 595795373 8...

correct output
598676555 23565408317817

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 38, in <module>
    if d.get(s[i]) != 25 and d.get(s[i]) > d.get(s[(i+1)%26]):
TypeError: unorderable types: NoneType() > NoneType()