import sequtils,times proc printf(formatstr: cstring){.header: "", varargs.} template stopwatch(body) = (let t1 = cpuTime();body;echo "TIME:",(cpuTime() - t1) * 1000,"ms") template stopwatch(body) = body # GC_disableMarkAndSweep() proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "" .} proc scan(): int = var minus = false block: let k = getchar_unlocked() if k == '-' : minus = true else: result = 10 * result + k.ord - '0'.ord while true: let k = getchar_unlocked() if k < '0' or k > '9': break result = 10 * result + k.ord - '0'.ord if minus: result *= -1 stopwatch: let n = scan() let px = scan() let py = scan() var Q,V,X,Y : array[100010,int] for i in 0..