Solutions for ACM competition problems