spoj problem solutions

cpp solutions to some of the spoj problems.