taichunmin's UVa Code