You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
문제 링크
https://www.acmicpc.net/problem/9489
문제 조건
증가하는 정수 수열을 이용해 트리를 만든다.
아이디어
1시간 넘게 고민해도 잘 해결되지 않아 답지를 봤다.. 비슷하게 접근은 했지만 구현 능력이 아직 골드 문제들을 풀어내기엔 부족한 것 같다. 그리고 트리라고 해서, 그래프라고 해서 무조건 인접 리스트나 이차원 배열로 해결하려는 습관을 고쳐야 할 것 같다.
풀이법은 다음과 같다. 매우 간단하다.
구현
All reactions