graph problems on UVa