uva problems (competitive programming 3)  http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=638