Mark the Rope

Time Limit: 20000/10000 MS (Java/Others)