시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 624 435 358 70.891%

문제

상근이는 슬로베니아의 도시 Donji Andrijevci를 여행하고 있다. 이 도시의 도로는 깊이가 K인 완전 이진 트리를 이루고 있다. 깊이가 K인 완전 이진 트리는 총 2K-1개의 노드로 이루어져 있다. (아래 그림) 각 노드에는 그 곳에 위치한 빌딩의 번호가 붙여져 있다. 또, 가장 마지막 레벨을 제외한 모든 집은 왼쪽 자식과 오른쪽 자식을 갖는다.

깊이가 2와 3인 완전 이진 트리

상근이는 도시에 있는 모든 빌딩에 들어갔고, 들어간 순서대로 번호를 종이에 적어 놓았다. 한국으로 돌아온 상근이는 도시가 어떻게 생겼는지 그림을 그려보려고 하였으나, 정확하게 기억이 나지 않아 실패했다. 하지만, 어떤 순서로 도시를 방문했는지 기억해냈다.

  1. 가장 처음에 상근이는 트리의 루트에 있는 빌딩 앞에 서있다.
  2. 현재 빌딩의 왼쪽 자식에 있는 빌딩에 아직 들어가지 않았다면, 왼쪽 자식으로 이동한다.
  3. 현재 있는 노드가 왼쪽 자식을 가지고 있지 않거나 왼쪽 자식에 있는 빌딩을 이미 들어갔다면, 현재 노드에 있는 빌딩을 들어가고 종이에 번호를 적는다.
  4. 현재 빌딩을 이미 들어갔다 온 상태이고, 오른쪽 자식을 가지고 있는 경우에는 오른쪽 자식으로 이동한다.
  5. 현재 빌딩과 왼쪽, 오른쪽 자식에 있는 빌딩을 모두 방문했다면, 부모 노드로 이동한다.

왼쪽 그림에 나와있는 마을이라면, 상근이는 2-1-3 순서대로 빌딩을 들어갔을 것이고, 오른쪽 그림의 경우에는 1-6-4-3-5-2-7 순서로 들어갔을 것이다. 상근이가 종이에 적은 순서가 모두 주어졌을 때, 각 레벨에 있는 빌딩의 번호를 구하는 프로그램을 작성하시오.

입력

첫째 줄에 K (1 ≤ K ≤ 10)가 주어진다.

둘째 줄에는 상근이가 방문한 빌딩의 번호가 들어간 순서대로 주어진다. 모든 빌딩의 번호는 중복되지 않으며, 구간 [1,2K)에 포함된다.

출력

총 K개의 줄에 걸쳐서 정답을 출력한다. i번째 줄에는 레벨이 i인 빌딩의 번호를 출력한다. 출력은 왼쪽에서부터 오른쪽 순서대로 출력한다.

예제 입력 1

3
1 6 4 3 5 2 7

예제 출력 1

3
6 2
1 4 5 7
W3sicHJvYmxlbV9pZCI6Ijk5MzQiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM2NDRcdWM4MDQgXHVjNzc0XHVjOWM0IFx1ZDJiOFx1YjlhYyIsImRlc2NyaXB0aW9uIjoiPHA+XHVjMGMxXHVhZGZjXHVjNzc0XHViMjk0IFx1YzJhY1x1Yjg1Y1x1YmNhMFx1YjJjOFx1YzU0NFx1Yzc1OCBcdWIzYzRcdWMyZGMgRG9uamkgQW5kcmlqZXZjaVx1Yjk3YyBcdWM1ZWNcdWQ1ODlcdWQ1NThcdWFjZTAgXHVjNzg4XHViMmU0LiBcdWM3NzQgXHViM2M0XHVjMmRjXHVjNzU4IFx1YjNjNFx1Yjg1Y1x1YjI5NCBcdWFlNGFcdWM3NzRcdWFjMDAgS1x1Yzc3OCBcdWM2NDRcdWM4MDQgXHVjNzc0XHVjOWM0IFx1ZDJiOFx1YjlhY1x1Yjk3YyBcdWM3NzRcdWI4ZThcdWFjZTAgXHVjNzg4XHViMmU0LiBcdWFlNGFcdWM3NzRcdWFjMDAgS1x1Yzc3OCBcdWM2NDRcdWM4MDQgXHVjNzc0XHVjOWM0IFx1ZDJiOFx1YjlhY1x1YjI5NCBcdWNkMWQgMjxzdXA+SzxcL3N1cD4tMVx1YWMxY1x1Yzc1OCBcdWIxNzhcdWI0ZGNcdWI4NWMgXHVjNzc0XHViOGU4XHVjNWI0XHVjODM4IFx1Yzc4OFx1YjJlNC4gKFx1YzU0NFx1Yjc5OCBcdWFkZjhcdWI5YmMpIFx1YWMwMSBcdWIxNzhcdWI0ZGNcdWM1ZDBcdWIyOTQgXHVhZGY4IFx1YWNmM1x1Yz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dCB2aXNpdGVkLiBUaGUgc2Vjb25kIGxpbmUgb2YgaW5wdXQgY29udGFpbnMgMjxzdXA+SzxcL3N1cD4gaW50ZWdlcnMsIHRoZSBzZXF1ZW5jZSBvZiBob3VzZSBudW1iZXJzIG9uIE1pcmtvJiMzOTtzIHBhcGVyLiBUaGUgaG91c2UgbnVtYmVycyB3aWxsIGJlIHVuaXF1ZSBhbmQgZnJvbSB0aGUgaW50ZXJ2YWwgWzEsIDI8c3VwPks8XC9zdXA+XS4mbmJzcDs8XC9wPlxyXG4iLCJvdXRwdXQiOiI8cD5UaGUgb3V0cHV0IG11c3QgY29uc2lzdCBvZiBLIGxpbmVzLiBUaGUgaTxzdXA+dGg8XC9zdXA+IGxpbmUgbXVzdCBjb250YWluIHRoZSBzZXF1ZW5jZSBvZiBob3VzZSBudW1iZXJzIGluIHRoZSBpPHN1cD50aDxcL3N1cD4gbGV2ZWwgb2YgdGhlIHZpbGxhZ2UuJm5ic3A7PFwvcD5cclxuIiwiaGludCI6IiIsIm9yaWdpbmFsIjoiMSIsInByb2JsZW1fbGFuZ19jb2RlIjoiXHVjNjAxXHVjNWI0In1d

출처

Contest > Croatian Open Competition in Informatics > COCI 2013/2014 > Contest #5 2번

  • 문제를 번역한 사람: baekjoon
  • 문제의 오타를 찾은 사람: rhs0266