UVa 555: comparing function and map deck