asked
Introduction to Python Algorithm Problem Solving (Coding Test Preparation)
10. Inverse sequence (greedy)
Written on
·
228
0
N = int(input())
a = list(map(int,input().split()))
ra = []
i = N
while i>0:
ra.insert(a[i-1],i)
i -= 1
for x in ra:
print(x,end=' ')
입력받은 역수열의 마지막 index 부터 접근하여 차례로 해당 index에 삽입했습니다.
Answer 1
네. 잘하셨습니다.