A - Array Distribution

Languages: C, C++, Java, Python, Kotlin
Time & Memory limits: (details)

Input

Output

Sample test(s)

Input
5 1 2 3 4 6
--- Showing first 30 lines (click "Copy" to get full content) ---
Output
POSSIBLE 00110
--- Showing first 30 lines (click "Copy" to get full content) ---
Input
3 3 2 1
--- Showing first 30 lines (click "Copy" to get full content) ---
Output
IMPOSSIBLE
--- Showing first 30 lines (click "Copy" to get full content) ---