-
카테고리
-
세부 분야
알고리즘 · 자료구조
-
해결 여부
미해결
이렇게 풀어도 되는지 모르겠습니다
23.10.09 23:44 작성 23.10.09 23:54 수정 조회수 181
0
import sys
sys.stdin=open("input.txt","rt")
n=int(input())
ls=list(map(int, input().split()))
res=[0]*n
for i in range(n):
check = ls[i]
count = 0
for j in range(n):
if res[j] == 0:
if count == check:
res[j] = i + 1
break
else:
count += 1
for x in res:
print(x, end=" ")
답변을 작성해보세요.
0
답변 1