Dungeon Crawler
Unrated
English
Language
Contribute a translation- Time limit
- 5000 ms
- Memory limit
- 2048 MB (no extra memory)
- Submissions
- 0
- Correct
- 0
- Solved by
- 0
- AC rate
- —
Statement
Examples
Sample input 1
5 4 1 2 3 1 3 1 3 4 4 3 5 2 1 2 4 1 4 2 5 2 1 4 3 1
Sample output 1
15 17 impossible 12
Sample input 2
7 4 1 2 1 1 3 1 1 4 1 1 5 1 1 6 1 1 7 1 1 2 3 5 4 1 3 1 4 2 4 5
Sample output 2
11 impossible 10 10
Tags
No tags yet