CSES - Aalto Competitive Programming 2024 - wk1 - Wed - Results
Submission details
Task:LumberUolevi
Sender:aalto2024a_012
Submission time:2024-09-04 17:47:35 +0300
Language:PyPy3
Status:READY
Result:
Test results
testverdicttime
#10.06 sdetails
#20.06 sdetails
#30.06 sdetails
#40.07 sdetails
#50.06 sdetails
#60.06 sdetails
#70.06 sdetails
#80.06 sdetails
#90.06 sdetails
#100.06 sdetails
#110.06 sdetails
#120.06 sdetails
#130.06 sdetails
#140.07 sdetails
#150.07 sdetails
#160.06 sdetails
#170.06 sdetails
#180.06 sdetails
#190.06 sdetails
#200.07 sdetails
#210.07 sdetails
#220.06 sdetails
#230.06 sdetails
#240.06 sdetails
#250.07 sdetails
#260.06 sdetails
#270.06 sdetails
#280.06 sdetails
#290.07 sdetails
#300.06 sdetails
#310.06 sdetails
#320.06 sdetails
#330.06 sdetails
#340.06 sdetails
#350.06 sdetails
#360.06 sdetails
#370.06 sdetails
#380.06 sdetails
#390.06 sdetails
#400.06 sdetails
#410.06 sdetails
#420.06 sdetails
#430.06 sdetails
#440.06 sdetails
#450.06 sdetails
#460.07 sdetails
#470.06 sdetails
#480.06 sdetails
#490.06 sdetails
#500.06 sdetails
#510.06 sdetails
#520.06 sdetails
#530.07 sdetails
#540.06 sdetails
#550.06 sdetails
#560.06 sdetails
#570.06 sdetails
#580.06 sdetails
#590.06 sdetails
#600.06 sdetails
#610.06 sdetails
#620.06 sdetails
#630.06 sdetails

Code

N = int(input(""))
K = int(input(""))

output = []

if K == N:
    output = [ i for i in range(1, N+1) ]
else:

    if K % 2 == 1:
        output.append(N)
        K -= 1

    for i in range(K//2):
        output.append(i+1)
        output.append(N-1-i)


output_str = ""

for x in output:
    output_str += f"{x} "

print(output_str[:-1])

Test details

Test 1

Verdict:

input
1 1

correct output

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '1 1'

Test 2

Verdict:

input
2 1

correct output

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '2 1'

Test 3

Verdict:

input
2 1

correct output

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '2 1'

Test 4

Verdict:

input
3 2

correct output
1 2 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '3 2'

Test 5

Verdict:

input
3 3

correct output
1 2 3 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '3 3'

Test 6

Verdict:

input
4 1

correct output

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '4 1'

Test 7

Verdict:

input
4 4

correct output
1 2 3 4 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '4 4'

Test 8

Verdict:

input
5 1

correct output

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '5 1'

Test 9

Verdict:

input
5 5

correct output
1 2 3 4 5 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '5 5'

Test 10

Verdict:

input
6 1

correct output

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '6 1'

Test 11

Verdict:

input
10 6

correct output
1 2 3 5 9 10 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '10 6'

Test 12

Verdict:

input
10 5

correct output
1 2 3 4 10 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '10 5'

Test 13

Verdict:

input
10 5

correct output
1 2 3 4 10 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '10 5'

Test 14

Verdict:

input
10 6

correct output
1 2 3 5 9 10 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '10 6'

Test 15

Verdict:

input
10 10

correct output
1 2 3 4 5 6 7 8 9 10 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '10 10'

Test 16

Verdict:

input
11 3

correct output
1 2 8 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '11 3'

Test 17

Verdict:

input
11 10

correct output
1 2 3 4 5 6 7 8 9 10 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '11 10'

Test 18

Verdict:

input
11 1

correct output
11 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '11 1'

Test 19

Verdict:

input
12 11

correct output
1 2 3 4 5 7 8 9 10 11 12 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '12 11'

Test 20

Verdict:

input
12 1

correct output
12 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '12 1'

Test 21

Verdict:

input
20 11

correct output
1 2 3 4 5 6 7 8 9 15 20 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '20 11'

Test 22

Verdict:

input
20 9

correct output
1 2 3 4 5 6 7 12 20 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '20 9'

Test 23

Verdict:

input
21 10

correct output
1 2 3 4 5 6 7 8 9 18 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '21 10'

Test 24

Verdict:

input
22 13

correct output
1 2 3 4 5 6 7 8 9 10 12 21 22 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '22 13'

Test 25

Verdict:

input
20 20

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '20 20'

Test 26

Verdict:

input
20 5

correct output
1 2 3 4 10 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '20 5'

Test 27

Verdict:

input
23 21

correct output
1 2 3 4 5 6 7 8 9 10 13 14 15 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '23 21'

Test 28

Verdict:

input
24 2

correct output
1 23 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '24 2'

Test 29

Verdict:

input
20 18

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '20 18'

Test 30

Verdict:

input
25 1

correct output
25 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '25 1'

Test 31

Verdict:

input
123 68

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '123 68'

Test 32

Verdict:

input
201 84

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '201 84'

Test 33

Verdict:

input
200 88

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '200 88'

Test 34

Verdict:

input
202 112

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '202 112'

Test 35

Verdict:

input
200 194

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '200 194'

Test 36

Verdict:

input
204 46

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '204 46'

Test 37

Verdict:

input
205 184

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '205 184'

Test 38

Verdict:

input
200 16

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '200 16'

Test 39

Verdict:

input
207 181

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '207 181'

Test 40

Verdict:

input
201 3

correct output
1 2 198 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '201 3'

Test 41

Verdict:

input
1123 617

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '1123 617'

Test 42

Verdict:

input
2201 918

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '2201 918'

Test 43

Verdict:

input
3200 1396

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '3200 1396'

Test 44

Verdict:

input
2202 1213

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '2202 1213'

Test 45

Verdict:

input
1200 1161

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '1200 1161'

Test 46

Verdict:

input
5204 1156

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '5204 1156'

Test 47

Verdict:

input
6205 5541

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '6205 5541'

Test 48

Verdict:

input
3200 245

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '3200 245'

Test 49

Verdict:

input
7207 6295

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '7207 6295'

Test 50

Verdict:

input
9201 96

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '9201 96'

Test 51

Verdict:

input
51123 28058

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '51123 28058'

Test 52

Verdict:

input
32201 13429

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '32201 13429'

Test 53

Verdict:

input
23200 10116

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '23200 10116'

Test 54

Verdict:

input
12202 6721

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '12202 6721'

Test 55

Verdict:

input
21200 20502

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '21200 20502'

Test 56

Verdict:

input
35204 7816

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '35204 7816'

Test 57

Verdict:

input
46205 41255

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '46205 41255'

Test 58

Verdict:

input
63200 4823

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '63200 4823'

Test 59

Verdict:

input
87207 76170

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '87207 76170'

Test 60

Verdict:

input
99201 1030

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '99201 1030'

Test 61

Verdict:

input
100000 54883

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '100000 54883'

Test 62

Verdict:

input
100000 41703

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '100000 41703'

Test 63

Verdict:

input
100000 43601

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    N = int(input(""))
ValueError: invalid literal for int() with base 10: '100000 43601'