시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
2 초 | 512 MB | 87 | 47 | 44 | 55.000% |
Once again the time dawns to demonstrate the sheer power of the Illuminati. To do so, it was decided to build an n-dimensional hyper-step pyramid using n-dimensional blocks:
To prove their might even further the Illuminati leaders have decided to add two more requirements:
Figure H.1: A 3-dimensional hyper pyramid with 3 steps consisting of 14 blocks in total.
The input consists of:
If a hyper-step pyramid matching all the requirements exists, output a single line with two integers n and s, the dimension of the pyramid and its number of steps. If none exists, output impossible. If multiple solutions exist, any will be accepted.
14
3 3
9
4 2
24
impossible
9134731356568978
5 2147