μκ³ λ¦¬μ¦λ μν΄μΌ λλν κ°λ°μκ° λ μ μκ² μ£ ?
κ·Έλμ μ‘°κΈμ© μ¬μ΄κ²λΆν° νμ΄λ³΄λ €κ΅¬μγ γ ;
μ€λμ νΉλ΅λ₯ 50νΌμ΄μ λ¬Έμ λ€μ΄λΌμ μ½κ² νμλλ° λ€μλΆν°κ° κ±±μ μ΄λ€μ€..π€π€
N = int(input())
input_list = list(map(int, input().split()))
result = []
for i, n in enumerate(input_list):
result.insert(i-n, i+1)
for i in result:
print(i,end=' ')
N, K =map(int,input().split())
result = 0
cnt = [0]*12
#i 0 2 4 6 8 10 // 1 3 5 7 9 11
#n 1 2 3 4 5 6 1 2 3 4 5 6
# 2*(n-1) 2*n-1
for _ in range(N):
s, y = map(int, input().split())
if s:
i = (2*y)-1
cnt[i] += 1
if cnt[i] == K:
cnt[i] = 0
result += 1
else:
i = 2*(y-1)
cnt[i] += 1
if cnt[i] == K:
cnt[i] = 0
result += 1
for n in cnt:
if n!=0:
result += 1
print(result)