34

Problem ID: 34

The original critical (large) input on this problem times out. So, it has not been included. However, a version with reduced number of test cases has been.