tours13.c for spoj contest