Giveyouanumbersequence,canyoutellmebetweenthei-thnumberandthej-thnumber,whichisthemaximumandwhichistheminimum?
Input
ThefirstlineoftheinputisNandQ.N(N