201703-1 分蛋糕
n,k = map(int,input().split())
a_list = list(map(int,input().split()))
a=0
child = 0
for i in range(len(a_list)):
if a == 0 and a_list[i]>=k:
child+=1
continue
if a+a_list[i] >=k:
child+=1
a = 0
else:
if i == len(a_list)-1:
child+=1
else:
a+=a_list[i]
print(child)
201703-2 学生排队
n = int(input())
m = int(input())
queue = [i+1 for i in range(n)]
for i in range(m):
data,position = map(int,input().split())
index = queue.index(data)
after_position = index+position
queue.remove(data)
queue.insert(after_position,data)
for i in queue:
print(i,end=" ")