#37172: python 紀錄


BensonDC (python戰士)

School : No School
ID : 240921
IP address : [36.238.149.25]
Last Login :
2024-06-12 02:07:41
g797. 洗牌 (Cards) -- TOI練習賽202111新手組第2題 | From: [36.238.105.93] | Post Date : 2023-08-23 18:30

N,M=map(int,input().split())
X=[int(x) for x in input().split()]
Y=[]
for i in range(M):
    temp=[]
    X,Y=X[:N//2],X[N//2:]
    for j in range(N//2):
        temp.append(X[j])
        temp.append(Y[j])
    X=temp
print(*X)

 
ZeroJudge Forum