s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s581246159 | p03673 | u175590965 | 1582948113 | Python | Python (3.4.3) | py | Runtime Error | 165 | 25156 | 154 | n = int(input())
a = list(map(int,input().split()))
if n%2 ==0:
b = a[1::2][::-1]+a[::2]
print(*b)
else:
b =a[::2][::-1]*a[1::2]
print(*b) |
s178131175 | p03673 | u349091349 | 1582770787 | Python | PyPy3 (2.4.0) | py | Runtime Error | 388 | 100920 | 265 | from collections import deque
n=int(input())
a=deque([int(i) for i in input().split()])
b=deque()
for i in range(n):
if i % 2 == 0:
b.append(a.popleft())
else:
b.appendleft(a.popleft())
if n%2==0:
print(*b)
else:
print(*b[::-1]) |
s334336695 | p03673 | u349091349 | 1582770706 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38724 | 25 | b.insert(0,a[i])
|
s142280898 | p03673 | u408375121 | 1581963249 | Python | Python (3.4.3) | py | Runtime Error | 2105 | 20900 | 246 | n = int(input())
a = input().split()
s = ''
t = ''
for i in range(1, n):
if i % 2 == 0:
s = s + a[i]
else:
s = a[i] + s
if n % 2 == 1:
print(' '.join(s))
else:
t = ''
for i in range(1, n + 1):
t += s[-i]
print(' '.join(t)) |
s047198808 | p03673 | u408375121 | 1581961659 | Python | Python (3.4.3) | py | Runtime Error | 68 | 26360 | 222 | n = int(input())
a = list(map(int, input().split()))
s = ''
t = ''
for i in range(n):
if i % 2 == 0:
s = s + a[i]
t = a[i] + t
else:
s = a[i] + s
t = t + a[i]
if n % 2 == 1:
print(s)
else:
print(t)
|
s714647716 | p03673 | u408375121 | 1581961412 | Python | Python (3.4.3) | py | Runtime Error | 66 | 26356 | 233 | n = int(input())
a = list(map(int, input().split()))
s = ''
for i in range(n):
if i % 2 == 0:
s = s + a[i]
else:
s = a[i] + s
if n % 2 == 1:
print(s)
else:
t = ''
for j in range(1, n + 1):
t += s[-j]
print(t)
|
s468629352 | p03673 | u408375121 | 1581961168 | Python | Python (3.4.3) | py | Runtime Error | 66 | 26020 | 231 | n = int(input())
a = list(map(int, input().split()))
s = ''
for i in range(n):
if i % 2 == 0:
s = s + a[i]
else:
s = a[i] + s
if n % 2 == 1:
print(s)
else:
t = ''
for j in range(1, n + 1):
t = s[-j]
print(t) |
s781675049 | p03673 | u016568601 | 1581893861 | Python | Python (3.4.3) | py | Runtime Error | 1283 | 144964 | 153 | n = int(input())
num = list(map(int, input().split()))
new_list = []
for i in num:
new_list.append(i)
new_list.reverse()
print(new_list)
|
s117996554 | p03673 | u711539583 | 1581728808 | Python | Python (3.4.3) | py | Runtime Error | 77 | 26180 | 133 | n = int(input())
a = list(map(int, input().split()))
odd = a[::2]
even = a[1::2]
even.reverse()
ans = even + odd
print(" ".join(ans)) |
s423200788 | p03673 | u768559443 | 1581728762 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 75 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2], *A[N%2::2]) |
s977521650 | p03673 | u768559443 | 1581728611 | Python | PyPy3 (2.4.0) | py | Runtime Error | 168 | 38256 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
s963108130 | p03673 | u768559443 | 1581728469 | Python | Python (3.4.3) | py | Runtime Error | 16 | 2940 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
s294131208 | p03673 | u768559443 | 1581728337 | Python | Python (3.4.3) | py | Runtime Error | 19 | 2940 | 75 | n=int(input())
a=list(map(int,input().split()))
print(*a[::-2],*a[n%2::2]) |
s110477949 | p03673 | u810066979 | 1581544284 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 482 | import sys
def even(*a,n):
b=[]
b.append(a[0])
for i in range(1,n,2):
b.insert(0, a[i])
try:
b.append(a[i+1])
except:
pass
for j in range(n):
print(str(b[j])+" ", end="")
def odd(*a,n):
b=[]
b.append(a[0])
for i in range(1,n,2):
b.append(a[i])
try:
b.insert(0,a[i+1])
except:
pass
for... |
s807061554 | p03673 | u810066979 | 1581542929 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 26020 | 378 | import sys
n=int(input())
a=list(map(int,input().split()))
b=[]
if n&2==0:
b.append(a[0])
for i in range(1,n,2):
b.insert(0, a[i])
try:
b.append(a[i+1])
except:
pass
for j in range(n):
print(str(b[j])+" ", end="")
sys.exit()
else:
b.append(a[0])
for i in range(1,n,2):
b.append(a[i])
b.insert(0, ... |
s340754556 | p03673 | u686036872 | 1581228018 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 116 | n = int(input())
S = list(map(int, input().split()))
b=[]
for in range(n):
b.append(S[i])
b=b[::-1]
print(b) |
s862073649 | p03673 | u686036872 | 1581227984 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 107 | n = int(input())
S = list(map(int, input().split()))
b=[]
for in range(n):
b.append(S[i])
S=S[::-1] |
s179606644 | p03673 | u684305751 | 1580604162 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 129 | n=int(input())
a=list(map(int,input().split()))
if n%2==1:
print(*a[::-2],*a[1::2])
if n%2==0:
print(*a[::-2],*a[0::2])
|
s804355962 | p03673 | u684305751 | 1580604123 | Python | PyPy3 (2.4.0) | py | Runtime Error | 178 | 38256 | 129 | n=int(input())
a=list(map(int,input().split()))
if n%2==1:
print(*a[::-2],*a[1::2])
if n%2==0:
print(*a[::-2],*a[0::2])
|
s406518696 | p03673 | u414458988 | 1580434428 | Python | PyPy3 (2.4.0) | py | Runtime Error | 165 | 38516 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
s558883995 | p03673 | u414458988 | 1580433709 | Python | PyPy3 (2.4.0) | py | Runtime Error | 163 | 38512 | 146 | from collectiojns import deque
n=int(input())
a=list(map(int,input().split()))
b=deque()
for i in range(n):
b.append(a[i])
b=[::-1]
print(*b) |
s897601212 | p03673 | u414458988 | 1580433668 | Python | PyPy3 (2.4.0) | py | Runtime Error | 165 | 38512 | 147 | from collectiojns import deque
n=int(input())
a=list(map(int,input().split()))
b=deque()
for i in range(n):
b.append(a[i])
b=[b::-1]
print(*b) |
s137525272 | p03673 | u737298927 | 1580433457 | Python | Python (3.4.3) | py | Runtime Error | 1313 | 144964 | 192 | n = int(input())
a = list(map(int, input().split()))
b=[]
a = a[::-1]
for i in range(n):
b.append(a.pop(-1))
b = b[::-1]
print(b)
for i in range(len(b)):
print(b[i], end=" ") |
s726550475 | p03673 | u127499732 | 1580225099 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
s135622214 | p03673 | u279493135 | 1579727541 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 925 | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase... |
s554335174 | p03673 | u490553751 | 1579154323 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 20016 | 536 | n = int(input())
a = input().split()
if n % 2 == 0 :
le = [0] * n // 2
lo = [0] * n // 2
counte = 0
counto = 0
for i in range(n) :
if i % 2 == 0 :
lo[counto] = a[i]
counto+=1
else :
le[counte] = a[i]
counte +=1
le.reverse()
l = ... |
s801204511 | p03673 | u735008991 | 1578770852 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 205 | n = int(input())
a = list(map(int, input().split()))
ans = []
for i in range(N):
if (i+1) % 2 == N % 2:
ans = [a.pop(0)] + ans
else:
ans = ans + [a.pop()]
print(*ans, sep=" ") |
s157659552 | p03673 | u540761833 | 1578592074 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 115 | n = int(input())
a = list(map(int,input().split()))
if n == 1:
print(a[0])
else:
print(*a[::-2],*a[n%2::2]) |
s238062678 | p03673 | u540761833 | 1578591069 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 78 | n = int(input())
a = list(map(int,input().split()))
print(*a[::-2],*a[n%2::2]) |
s117612250 | p03673 | u540761833 | 1578590944 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 113 | n = int(input())
a = list(map(int,input().split()))
if n == 1:
print(a[0])
else:
print(*a[::-2],*a[::2])
|
s522255511 | p03673 | u540761833 | 1578590858 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 76 | n = int(input())
a = list(map(int,input().split()))
print(*a[::-2],*a[::2])
|
s201374081 | p03673 | u797994565 | 1578347307 | Python | PyPy3 (2.4.0) | py | Runtime Error | 279 | 97620 | 279 | N = int(input())
A = list(map(int,input().split()))
B = [-10000 for i in range(N)]
for i in range(N):
if (N-i)%2 != 0:#from front
index = (N-i)//2
B[index] = A[i]
else:# from backward
index = N - (N-i)//2
B[index] = A[i]
print(" ".join(B)) |
s065869036 | p03673 | u076764813 | 1577984397 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
s632220633 | p03673 | u076764813 | 1577984211 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 76 | n=int(input())
a=list(map(int,input().split()))
print(*a[::-2], *a[n%2::2]) |
s538301444 | p03673 | u869919400 | 1576966661 | Python | PyPy3 (2.4.0) | py | Runtime Error | 269 | 86868 | 242 | N = int(input())
A = list(map(int, input().split()))
A.reverse()
from collections import deque
b1 = deque([])
b2 = deque([])
for i in range(N):
if i % 2 == 0:
b1.append(A[i])
else:
b2.appendleft(A[i])
print(*(b1+b2)) |
s353960391 | p03673 | u580258754 | 1576597708 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
s885675963 | p03673 | u994521204 | 1576563473 | Python | Python (3.4.3) | py | Runtime Error | 901 | 33860 | 273 | n=int(input())
A=list(map(int,input().split()))
from collections import deque
ans=deque([])
d=deque(A)
for i in range(0,n):
if i%2==0:
ans.append(d[i])
if i%2==1:
ans.appendleft(d[i])
a=list(ans)
if n%2==1:
c=a[::-1]
print(" ".join(map(str, c))) |
s031022360 | p03673 | u994521204 | 1576563242 | Python | Python (3.4.3) | py | Runtime Error | 78 | 26180 | 279 | n=int(input())
A=list(map(int,input().split()))
from collections import deque
ans=deque([])
d=deque(A)
for i in range(0,n):
if i%2==0:
ans.append(d[i])
if i%2==1:
ans.insert(0,d[i])
ans=list(ans)
if n%2==1:
ans=ans[::-1]
print(" ".join(map(str, ans))) |
s333877213 | p03673 | u994521204 | 1576562994 | Python | Python (3.4.3) | py | Runtime Error | 77 | 26020 | 279 | n=int(input())
A=list(map(int,input().split()))
from collections import deque
ans=deque([])
d=deque(A)
for i in range(0,n):
if i%2==0:
ans.append(d[i])
if i%2==1:
ans.insert(0,d[i])
ans=list(ans)
if n%2==1:
ans=ans[::-1]
print(" ".join(map(str, ans))) |
s256228969 | p03673 | u994521204 | 1576562945 | Python | Python (3.4.3) | py | Runtime Error | 76 | 26180 | 271 | n=int(input())
A=list(map(int,input().split()))
from collections import deque
ans=deque([])
d=deque(A)
for i in range(0,n):
if i%2==0:
ans.append(d[i])
if i%2==1:
ans.insert(0,d[i])
if n%2==1:
ans=list(ans)[::-1]
print(" ".join(map(str, ans))) |
s096475761 | p03673 | u994521204 | 1576562856 | Python | Python (3.4.3) | py | Runtime Error | 67 | 26180 | 271 | n=int(input())
A=list(map(int,input().split()))
ans=deque([])
from collections import deque
d=deque(A)
for i in range(0,n):
if i%2==0:
ans.append(d[i])
if i%2==1:
ans.insert(0,d[i])
if n%2==1:
ans=list(ans)[::-1]
print(" ".join(map(str, ans))) |
s056491181 | p03673 | u353797797 | 1576425707 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 429 | import sys
sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def main():
input()
aa... |
s283496341 | p03673 | u981931040 | 1575794790 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 275 | N = int(input())
A = list(map(int,input().split()))
A_oddList = A[::2]
A_evenList = A[1::2]
A_oddList = A_oddList[::-1]
A_evenList = A_evenList[::-1]
if N % 2 == 1:
print(*A_oddList ,*A_evenList)
else:
A_oddList = A_oddList[::-1]
print(*A_evenList , *A_oddList)
|
s162508459 | p03673 | u981931040 | 1575794734 | Python | PyPy3 (2.4.0) | py | Runtime Error | 162 | 38256 | 275 | N = int(input())
A = list(map(int,input().split()))
A_oddList = A[::2]
A_evenList = A[1::2]
A_oddList = A_oddList[::-1]
A_evenList = A_evenList[::-1]
if N % 2 == 1:
print(*A_oddList ,*A_evenList)
else:
A_oddList = A_oddList[::-1]
print(*A_evenList , *A_oddList)
|
s526465025 | p03673 | u936985471 | 1575590584 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 102 | n=int(input())
a=list(map(int,input().split()))
b=a[1::2][::-1]+a[0::2]
print((*b,*(b[::-1]))[n%2>0])
|
s511103841 | p03673 | u936985471 | 1575587675 | Python | Python (3.4.3) | py | Runtime Error | 67 | 26180 | 223 | n=int(input())
a=list(map(int,input().split()))
bbottom=""
btop=""
for i in range(n):
if i%2==0:
bbottom.append(a[i])
else:
btop.append(a[i])
ans=btop[::-1]+bbottom
if n%2==1:
ans=ans[::-1]
print(ans)
|
s032115747 | p03673 | u936985471 | 1575587577 | Python | Python (3.4.3) | py | Runtime Error | 67 | 26360 | 209 | n=int(input())
a=list(map(int,input().split()))
bbottom=""
btop=""
for i in range(n):
if i%2==0:
bbottom+=a[i]
else:
btop+=a[i]
ans=btop[::-1]+bbottom
if n%2==1:
ans=ans[::-1]
print(ans)
|
s121585819 | p03673 | u936985471 | 1575587534 | Python | Python (3.4.3) | py | Runtime Error | 67 | 25156 | 207 | n=int(input())
a=list(map(int,input().split()))
bbottom=""
btop=""
for i in range(n):
if i%2==0:
bbottom+=a[i]
else:
btop+=a[i]
ans=btop[::-1]+bbottom
if n%2==1:
ans=ans[::-1]
prin(ans)
|
s471186052 | p03673 | u576917603 | 1575044891 | Python | Python (3.4.3) | py | Runtime Error | 161 | 29600 | 281 | n=int(input())
a=list(map(int,input().split()))
b=[]
i=n-1
for _ in range(n//2+1):
b.append(a[i])
i-=2
if i<=-1:
break
if n%2==0:
i=0
else:
i=1
for _ in range(n//2+1):
b.append(a[i])
i+=2
if i>=n-1:
break
print(' '.join(map(str,b))) |
s851398376 | p03673 | u923659712 | 1574126949 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 26020 | 111 | n=int(input())
a=list(map(int,input().split()))
s=[]
for i in a:
s.append(i)
s.reverse()
print(" ".join(s)) |
s179854200 | p03673 | u832152513 | 1574025011 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 153 | n = int(input())
a = list(map(int, input().split()))
if n%2 == 1:
r = a[::-2]
l = a[1::2]
else:
r = a[::-2]
l = a[::2]
print(*r,*l) |
s522787805 | p03673 | u735069283 | 1573933522 | Python | Python (3.4.3) | py | Runtime Error | 238 | 26180 | 269 | N=int(input())
a=[int(x) for x in input().split()]
b=[]
if N%2==0:
for i in range(N//2):
b += [a[-(i*2+1)]]
for i in range(N//2):
b += [a[i*2]]
else:
for i in range(1,N+1,2):
b += [a[-i]]
for j in range(1,N//2+3,2):
b += [a[j]]
print(*b,sep=' ') |
s888368217 | p03673 | u735069283 | 1573933348 | Python | Python (3.4.3) | py | Runtime Error | 227 | 26180 | 269 | N=int(input())
a=[int(x) for x in input().split()]
b=[]
if N%2==0:
for i in range(N//2):
b += [a[-(i*2+1)]]
for i in range(N//2):
b += [a[i*2]]
else:
for i in range(1,N+1,2):
b += [a[-i]]
for j in range(1,N//2+2,2):
b += [a[j]]
print(*b,sep=' ') |
s577908659 | p03673 | u819048695 | 1573079493 | Python | Python (3.4.3) | py | Runtime Error | 120 | 25412 | 434 | from collections import deque
n=int(input())
a=list(map(int,input().split()))
if n%2==0:
x=deque([])
y=deque([])
for i in range(n):
if i%2==1:
y.appendleft(a[i])
else:
x.append(a[i])
z=y+x
print(*z)
else:
x=deque([])
y=deque([])
for i in range(n):
... |
s718033525 | p03673 | u506858457 | 1572056427 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2]+*A[N%2::2]) |
s509378517 | p03673 | u506858457 | 1572050717 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
s934639054 | p03673 | u644907318 | 1571484584 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 146 | n = int(input())
A = list(map(int,input().split()))
Ae = A[0:n:2]
Ao = A[1:n:2]
if n%2==0:
print(*Ao[::-1],*Ae)
else:
print(*Ae[::-1],*Ao) |
s832766612 | p03673 | u146575240 | 1570933867 | Python | Python (3.4.3) | py | Runtime Error | 2105 | 26360 | 337 | # C - pushpush
n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(n):
if n % 2 == 0:
if i % 2 ==0:
b.append(a[i])
else:
b.insert(0,a[i])
else:
if i % 2 !=0:
b.append(a[i])
else:
b.insert(0,a[i])
print(' '.j... |
s600396338 | p03673 | u494058663 | 1570334417 | Python | Python (3.4.3) | py | Runtime Error | 2534 | 7648 | 236 | N = int(input())
A = [str(i) for i in input().split()]
dp = [[0,0] for i in range(N+1)]
dp[0][0],dp[0][1] = A[0],A[0]
for i in range(1,N):
dp[i][0] = dp[i-1][1]+A[i]
dp[i][1] = A[i]+dp[i-1][0]
ans = list(dp[N-1][1])
print(*ans) |
s246469669 | p03673 | u494058663 | 1570334290 | Python | Python (3.4.3) | py | Runtime Error | 3291 | 7520 | 236 | N = int(input())
A = [str(i) for i in input().split()]
dp = [[0,0] for i in range(N+1)]
dp[0][0],dp[0][1] = A[0],A[0]
for i in range(1,N):
dp[i][0] = dp[i-1][1]+A[i]
dp[i][1] = A[i]+dp[i-1][0]
ans = list(dp[N-1][1])
print(*ans) |
s504040694 | p03673 | u377989038 | 1570153590 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 251 | n = int(input())
a = list(map(int, input().split()))
odd = []
even = []
for i in range(n):
if i % 2 == 0:
even.append(a[i])
else:
odd.append(a[i])
if n % 2 == 1:
print(*even[::-1], *odd)
else:
print(*odd[::-1], *even) |
s182653848 | p03673 | u790710233 | 1569539664 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 82 | n, a = int(input()), list(map(int, input().split()))
print(*a[::-2], *a[n % 2::2]) |
s803354364 | p03673 | u296518383 | 1569469320 | Python | Python (3.4.3) | py | Runtime Error | 160 | 29124 | 226 | import collections
N=int(input())
A=list(map(int,input().split()))
B=collections.deque([])
for i,a in enumerate(A):
if i%2==0:
B.append(a)
else:
B.appendleft(a)
if N%2==1:
B=B[::-1]
print(" ".join(map(str,B))) |
s365637700 | p03673 | u268318377 | 1568595299 | Python | Python (3.4.3) | py | Runtime Error | 75 | 26180 | 176 | N = int(input())
A = [int(a) for a in input().split()]
B = deque([])
for n in range(N):
if n % 2 == 0:
B.append(A[n])
else:
B.appendleft(A[n])
print(*B) |
s445601962 | p03673 | u077291787 | 1568480413 | Python | Python (3.4.3) | py | Runtime Error | 73 | 25180 | 248 | # ABC066C - pushpush (ARC077)
def main():
N, *A = map(int, open(0).read().split())
if int(N) & 1:
B = A[::2][::-1] + A[1::2]
else:
B = A[1::2][::-1] + A[::2]
print(" ".join(B))
if __name__ == "__main__":
main() |
s419170113 | p03673 | u716043626 | 1568389028 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 192 | n = int(input())
a = list(map(int,input().split()))
ans = ''
for i in range(n):
if i % 2 == 0:
ans = ans + str(a[i]) +
else:
ans = str(a[i]) + ans
print(ans) |
s998721459 | p03673 | u332657092 | 1568248259 | Python | PyPy3 (2.4.0) | py | Runtime Error | 168 | 38256 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
s749577836 | p03673 | u332657092 | 1568248020 | Python | PyPy3 (2.4.0) | py | Runtime Error | 811 | 241940 | 204 | n = int(input())
A = input().split()
if len(A) % 2:
B = [A[-i][::-1] for i in range(1, len(A)-1, 2)] + A[1::2]
else:
B = [A[-i][::-1] for i in range(1, len(A), 2)] + A[::2]
b = "".join(B)
print(*b) |
s683318883 | p03673 | u521866787 | 1568166231 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 75 | n=int(input())
a= list(map(int,input().split()))
print(*a[::-2],*a[n%2::2]) |
s753455641 | p03673 | u521866787 | 1568082703 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 75 | n=int(input())
a= list(map(int,input().split()))
print(*a[::-2],*a[n%2::2]) |
s243803457 | p03673 | u521866787 | 1568082588 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
s408996806 | p03673 | u521866787 | 1568082364 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 75 | n=int(input())
a= list(map(int,input().split()))
print(*a[::-2],*a[n%2::2]) |
s225854063 | p03673 | u521866787 | 1568082321 | Python | PyPy3 (2.4.0) | py | Runtime Error | 176 | 38384 | 75 | n=int(input())
a= list(map(int,input().split()))
print(*a[::-2],*a[n%2::2]) |
s488628939 | p03673 | u521866787 | 1568082269 | Python | PyPy3 (2.4.0) | py | Runtime Error | 162 | 38256 | 75 | n=int(input())
a= list(map(int,input().split()))
print(*a[::-2],*a[n%2::2]) |
s866984846 | p03673 | u521866787 | 1568082191 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38256 | 75 | n=int(input())
a= list(map(int,input().split()))
print(*a[::-2],*a[a%2::2]) |
s099437057 | p03673 | u033606236 | 1567966877 | Python | PyPy3 (2.4.0) | py | Runtime Error | 179 | 38256 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
s382074091 | p03673 | u033606236 | 1567966827 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
s444308815 | p03673 | u033606236 | 1567966750 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 78 | n = int(input())
s = list(map(int,input().split()))
print(*s[::-2],*s[n%2::2]) |
s685059582 | p03673 | u033606236 | 1567966616 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 78 | n = int(input())
s = list(map(int,input().split()))
print(*s[::-2],*s[n%2::2]) |
s272659835 | p03673 | u600402037 | 1567876344 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
s951725868 | p03673 | u600402037 | 1567876130 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 274 | N = int(input())
A = list(map(int, input().split()))
right = []
left = []
for i in range(N):
if i % 2 == 0:
right.append(A[i])
else:
left.append(A[i])
answer = left[::-1]
answer += right
print(*answer if N%2 == 0 else *answer[::-1])
|
s666141717 | p03673 | u395202850 | 1567834376 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 134 | n = int(input())
a = list(map(int, input().split()))
b = a[0::2][::-1]
c = a[1::2]
b.extend(c)
print(*b[::-1] if n % 2 == 0 else *b)
|
s831864817 | p03673 | u440566786 | 1567206599 | Python | PyPy3 (2.4.0) | py | Runtime Error | 165 | 38256 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
s473312485 | p03673 | u440566786 | 1567206506 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38384 | 123 | n = int(input())
l = list(map(int,input().split()))
if n%2:
print(*l[::-2],*l[1::2])
else:
print(*l[::-2],*l[0::2]) |
s637653637 | p03673 | u440566786 | 1567206331 | Python | PyPy3 (2.4.0) | py | Runtime Error | 168 | 38256 | 123 | n = int(input())
l = list(map(int,input().split()))
if n%2:
print(*l[::-2],*l[1::2])
else:
print(*l[::-2],*l[0::2]) |
s637243755 | p03673 | u713465512 | 1566769782 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 26180 | 192 | n = int(input())
anums = [int(i) for i in input().split()]
b = []
for i in range(n):
if i % 2 == 0:
b.append(anums[i])
else:
b.insert(0,anums[i])
print(*result,sep=" ") |
s142757288 | p03673 | u271934630 | 1566680867 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 172 | n = int(input())
a = list(map(int, input().split()))
if len(a) % 2 == 0:
print(*list(reversed(a[1::2])), *a[0::2])
else:
print(*list(reversed(a[0::2])), *a[1::2])
|
s559780093 | p03673 | u271934630 | 1566680460 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 160 | n = int(input())
a = list(map(int, input().split()))
if len(a) % 2 == 0:
print(*reversed(a[1::2]), *a[0::2])
else:
print(*reversed(a[0::2]), *a[1::2])
|
s115704347 | p03673 | u271934630 | 1566680415 | Python | PyPy3 (2.4.0) | py | Runtime Error | 174 | 38384 | 160 | n = int(input())
a = list(map(int, input().split()))
if len(a) % 2 == 0:
print(*reversed(a[1::2]), *a[0::2])
else:
print(*reversed(a[0::2]), *a[1::2])
|
s787529165 | p03673 | u412481017 | 1566247303 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
s455965123 | p03673 | u412481017 | 1566247256 | Python | PyPy3 (2.4.0) | py | Runtime Error | 183 | 38384 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
s386411429 | p03673 | u248670337 | 1565985247 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 75 | n=int(input())
a=list(map(int,input().split()))
print(*a[::-2],*a[n%2::-2]) |
s656055048 | p03673 | u219086885 | 1565918802 | Python | Python (3.4.3) | py | Runtime Error | 51 | 24260 | 178 | n = int(input())
an = input().split()
if n == 1:
print(an[0])
else:
print(" ".join(list(reversed(an[1::2]))+an[::2]) if n%2==0 else " ".join(reversed(an[::2])+an[1::2]))
|
s265220813 | p03673 | u753803401 | 1565828575 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 205 | n = int(input())
a = list(map(int, input().split()))
lsa = []
lsb = []
for i in range(0, n, 2):
lsa.append(a[-i-1])
for i in range(0 if n % 2 == 0 else 1, n, 2):
lsb.append(a[i])
print(*lsa, *lsb)
|
s032312054 | p03673 | u231122239 | 1565720304 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 80 | n = int(input())
A = list(map(int, input().split()))
print(*A[::-2], *A[n%2::2]) |
s593980836 | p03673 | u231122239 | 1565719968 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 234 | n = int(input())
A = list(map(int, input().split()))
# TLE
# l = []
# for i, a in enumerate(A):
# if i%2 == 0:
# l.append(a)
# else:
# l.insert(0, a)
# print(' '.join(map(str, l)))
print(*A[::-2], *A[n%2::2]) |
s979528591 | p03673 | u494871759 | 1565693687 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 70 | List = list(map(int,input().split()))
print(*List[::-2],*List[n%2::2]) |
s837060478 | p03673 | u649126012 | 1565674145 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 1588 | #!/usr/bin/env python3
import sys
def solve_naive(n: int, a: "List[int]"):
b = list()
for i in range(n):
b.append(str(a[i]))
b.reverse()
print(" ".join(b))
return
def solve_(n: int, a: "List[int]"):
a = list(map(str, a))
b = list()
for i in range(n):
if i % 2 == 0:... |
s997450153 | p03673 | u242518667 | 1565136550 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
s736672176 | p03673 | u242518667 | 1565136493 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 74 | N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2]) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.