Hardest Problem Ever (Easy)

UVA - 12478