Practice problem solutions for ACM competition