포럼
문제 ICPC00178

I. Identifying Map Tiles

설명

Map websites such as Bing Maps and Google Maps often store their maps as many different image files, called tiles. The lowest zoom level (level \(0\)) consists of a single tile with a low-detail image of the whole map, zoom level \(1\) consists of four tiles each containing a slightly more detailed version of a quarter of the map, and in general zoom level \(n\) contains \(4^n\) different tiles that each contain a part of the map.

One way of identifying a tile is by means of a quadkey. A quadkey is a string of digits uniquely identifying a tile at a certain zoom level. The first digit specifies in which of the four quadrants of the whole map the tile lies: 0 for the top-left quadrant, 1 for the top-right quadrant, 2 for the bottom-left quadrant and 3 for the bottom-right quadrant. The subsequent digits specify in which sub quadrant of the current quadrant the tile is. The quadkeys for zoom levels \(1\) to \(3\) are shown in Figure (a).

[Quadkeys for zoom levels \(1\) to \(3\)]

[Coordinates for zoom level 3]

Another way of identifying a tile is to give the zoom level and \(x\) and \(y\) coordinates, where \((0,0)\) is the left-top corner. The coordinates for the tiles of zoom level 3 are shown in Figure (b). Given the quadkey of a tile, output the zoom level and \(x\) and \(y\) coordinates of that tile.

제약
입력 형식

The input consists of:
- one line with a string \(s\) (\(1\leq \text{length}(s) \leq 30\)), the quadkey of the map tile.

The string \(s\) consists of only the digits '0', '1', '2' and '3'.

출력 형식

Output three integers, the zoom level and the \(x\) and \(y\) coordinates of the tile.

예제 1
입력
3
출력
1 1 1
예제 2
입력
130
출력
3 6 2
문제 정보

생성자가 기록되지 않았습니다.

출처 ICPC NWERC 2015

평가 및 의견

I. Identifying Map Tiles

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 1 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

I. Identifying Map Tiles

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8