https://codeforces.com/contest/1711/problem/C시간 1초, 메모리 256MBinput :t (1 ≤ t ≤ 104)n m k (3 ≤ n, n ≤ 109, 1 ≤ k ≤ 105)a1 a2 ... ai (1 ≤ ai ≤ 109)