bug fix in Codeforces round 354, task C - handle properly case when there is no solution bigger than k