//https://yukicoder.me/problems/no/2938 fun main(){ val n = readln().toInt() val a = readln().split(" ").map { it.toInt()} var z: Int var ans: Int = 0 fun ab(x: Int, y: Int): Int { if (x >= y){ z = x-y }else z = y-x return z } for (i in 0..