def main(): ch = Checker() while True: r, n = ch.readInts(2) if r == 0 and n == 0: break ch.checkRange(r, R_MIN, R_MAX, 'R') ch.checkRange(n, N_MIN, N_MAX, 'N') xs = ch.readInts(n) ch.checkSorted(xs, 'Xs') ch.checkUnique(xs, 'Xs') for x in xs: ch.checkRange(x, X_MIN, X_MAX, 'X')
def main(): ch = Checker() while True: n, m = ch.readInts(2) if n == 0 and m == 0: break ch.checkRange(n, MIN, MAX, 'N') ch.checkRange(n, MIN, MAX, 'M') for varName in ['A', 'B']: length = {'A': n, 'B': m}[varName] lst = ch.readInts(length) ch.checkSorted(lst, varName + 's') ch.checkUnique(lst, varName + 's') for elem in lst: ch.checkRange(elem, MIN, MAX, varName)