#37172: python 紀錄


BensonDC (python戰士)

School : No School
ID : 240921
IP address : [114.39.0.1]
Last Login :
2025-04-20 17:12:34
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