import sequtils,algorithm proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "" .} proc scan(): int = while true: let k = getchar_unlocked() if k < '0' or k > '9': break result = 10 * result + k.ord - '0'.ord proc parseLine(): tuple[x,y:int] = result.x = scan() * 1440 + scan() * 60 + scan() result.y = scan() * 1440 + scan() * 60 + scan() proc swapSortDescending(arr:var seq[int],index:int) = # 10-9-6-3-7-2-1 ใ‚’็›ดใ™ for i in 0..= arr[index] : continue for j in i..= u.x: continue preY[i] = u.y ans += 1 preY.swapSortDescending(i) break echo ans