Problem B small input done!
Problem A small fixed after contest.
Problem A large. We should aspire to be the median.