백준 - 1874 (스택 수열)
·
알고리즘
import java.io.BufferedReader;import java.io.BufferedWriter;import java.io.IOException;import java.io.InputStreamReader;import java.io.OutputStreamWriter;import java.util.Scanner;import java.util.Stack;import java.util.StringTokenizer;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); // 첫 줄에 주어진 N int []su = new int[N]; ..