1874 java
-
boj)1874 - 스택 수열PS/boj 2020. 9. 13. 23:41
import java.io.*; import java.util.Stack; public class boj_1874 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBuilder(); Stack s = new Stack(); int n = Integer.parseInt(br.readLine()); // 1 ~ 100,000 int item = 0; // 스택에 오름차순으로 쌓일 수 while (n-- > 0) { int x = Integer.parseInt(br...