CSES - Datatähti 2017 alku - Results
Submission details
Task:Pakkaus
Sender:lutrarutra
Submission time:2016-10-15 01:22:12 +0300
Language:Python3
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
Test results
testverdicttimegroup
#10.06 s1details
#20.06 s1details
#30.07 s1details
#40.06 s1details
#50.06 s1details
#60.06 s2details
#70.06 s2details
#80.06 s2details
#90.07 s2details
#100.06 s2details
#110.06 s3details
#120.06 s3details
#130.07 s3details
#140.07 s3details
#150.07 s3details

Code

mx = int(input())

s = input().split(" ")

arr = []
editArr = []
counter = 0

for obj in s:
    arr.append(int(obj))

def findMax(a, ign):
    rtn = 0
    for obj in a:
        if obj < ign:
            rtn = max(rtn, obj)
    return rtn

max1 = findMax(arr, 100099000)
max1Index = arr.index(max1)

if max1Index % 2 == 0:
    i = 1
else:
    i = 0

arr2 = []

while i < arr.__len__():
    arr2.append(arr[i])
    i += 2

max2 = findMax(arr2, max1)
max2Index = arr.index(max2)

i = 0
sumstr = ""
arr31 = []
arr32 = []
arr33 = []


if max1Index - max2Index % 2 == 0 or abs(max1Index - max2Index) == 1:
    while i < arr.__len__():
        if i % 2 == 0:
            sumstr += str(1) + " "
        else:
            sumstr += str(2) + " "
        i += 1

    print(str(max1 + max2) + " " + str(2))
    print(sumstr)

else:
    for obj in arr:
        if obj == max1 or obj == max2:
            arr31.append(obj)
        elif



Test details

Test 1

Group: 1

Verdict:

input
1AAAAAAAAAAAAAAAAAAAA

correct output
AAAAAAAAAAAAAAAAAAAA

user output
(empty)

Error:
File "input/code.py", line 58
    elif
       ^
SyntaxError: invalid syntax

Test 2

Group: 1

Verdict:

input
1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A...

correct output
AAAAAAAAAAAAAAAAAAAA

user output
(empty)

Error:
File "input/code.py", line 58
    elif
       ^
SyntaxError: invalid syntax

Test 3

Group: 1

Verdict:

input
20A

correct output
AAAAAAAAAAAAAAAAAAAA

user output
(empty)

Error:
File "input/code.py", line 58
    elif
       ^
SyntaxError: invalid syntax

Test 4

Group: 1

Verdict:

input
2N1J2F1XH2D2B2VT1N1ES

correct output
NNJFFXHDDBBVTVTNES

user output
(empty)

Error:
File "input/code.py", line 58
    elif
       ^
SyntaxError: invalid syntax

Test 5

Group: 1

Verdict:

input
2Z1E1UN1P2A2A1D2F2EZ1FZ1J

correct output
ZZEUNPAAAADFFEZEZFZJ

user output
(empty)

Error:
File "input/code.py", line 58
    elif
       ^
SyntaxError: invalid syntax

Test 6

Group: 2

Verdict:

input
1AAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

user output
(empty)

Error:
File "input/code.py", line 58
    elif
       ^
SyntaxError: invalid syntax

Test 7

Group: 2

Verdict:

input
1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A...

correct output
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

user output
(empty)

Error:
File "input/code.py", line 58
    elif
       ^
SyntaxError: invalid syntax

Test 8

Group: 2

Verdict:

input
1000A

correct output
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

user output
(empty)

Error:
File "input/code.py", line 58
    elif
       ^
SyntaxError: invalid syntax

Test 9

Group: 2

Verdict:

input
11QOUDQFAFUPAYCPXZ15KANCLRGT9S...

correct output
QOUDQFAFUPAYCPXZQOUDQFAFUPAYCP...

user output
(empty)

Error:
File "input/code.py", line 58
    elif
       ^
SyntaxError: invalid syntax

Test 10

Group: 2

Verdict:

input
20NFBIUXOSO10XRXZRMULZDUFK14BB...

correct output
NFBIUXOSONFBIUXOSONFBIUXOSONFB...

user output
(empty)

Error:
File "input/code.py", line 58
    elif
       ^
SyntaxError: invalid syntax

Test 11

Group: 3

Verdict:

input
1AAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

user output
(empty)

Error:
File "input/code.py", line 58
    elif
       ^
SyntaxError: invalid syntax

Test 12

Group: 3

Verdict:

input
1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A...

correct output
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

user output
(empty)

Error:
File "input/code.py", line 58
    elif
       ^
SyntaxError: invalid syntax

Test 13

Group: 3

Verdict:

input
1000000A

correct output
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

user output
(empty)

Error:
File "input/code.py", line 58
    elif
       ^
SyntaxError: invalid syntax

Test 14

Group: 3

Verdict:

input
87GEIGDBZCYGSFYYCGQUAWQJFUUAQG...

correct output
GEIGDBZCYGSFYYCGQUAWQJFUUAQGDT...

user output
(empty)

Error:
File "input/code.py", line 58
    elif
       ^
SyntaxError: invalid syntax

Test 15

Group: 3

Verdict:

input
316XXYCLTBFQRAXHQPTLDB275NMQJD...

correct output
XXYCLTBFQRAXHQPTLDBXXYCLTBFQRA...

user output
(empty)

Error:
File "input/code.py", line 58
    elif
       ^
SyntaxError: invalid syntax