Programming Challenge

Memory limit for every solution is 256MB. The time limit for every solution is 5 seconds.

cozẽy[W