UVa 514 - Rails in CPP