Submission #8103907


Source Code Expand

Copy
n = int(input())
a = list(map(int,input().split()))

farm=[]
latt=[]

for i,x in enumerate(a):
    if i%2 == (n-1)%2:
        farm.append(x)
    else:
        latt.append(x)
farm.reverse()
ans = farm + latt

print(*ans)

Submission Info

Submission Time
Task C - pushpush
User wwskwwsk
Language Python3 (3.4.3)
Score 300
Code Size 233 Byte
Status
Exec Time 232 ms
Memory 26180 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample1.txt, sample2.txt, sample3.txt, sample4.txt
All 300 / 300 even_0.txt, even_1.txt, even_2.txt, even_3.txt, odd_0.txt, odd_1.txt, odd_2.txt, odd_3.txt, sample1.txt, sample2.txt, sample3.txt, sample4.txt
Case Name Status Exec Time Memory
even_0.txt 227 ms 25156 KB
even_1.txt 218 ms 25148 KB
even_2.txt 210 ms 25148 KB
even_3.txt 228 ms 25148 KB
odd_0.txt 207 ms 25156 KB
odd_1.txt 232 ms 26180 KB
odd_2.txt 227 ms 25156 KB
odd_3.txt 209 ms 26020 KB
sample1.txt 17 ms 2940 KB
sample2.txt 17 ms 2940 KB
sample3.txt 17 ms 3060 KB
sample4.txt 17 ms 3060 KB