백준 10866 java
-
boj)10866 - 덱PS/boj 2020. 10. 14. 21:17
import java.io.*; public class boj_10866 { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); public static void main(String[] args) throws IOException { int N = Integer.parseInt(br.readLine()); int[] arr = new int[(N*2) + 2]; int head = N; int tail = N; for (int i = 0; i < N; i++) { ..