문제https://www.acmicpc.net/problem/2668풀이import java.io.*;import java.util.*;public class Main { static int n; static int[] origin; static int[] in; static boolean[] visited; static Set answer = new TreeSet(); // 중복 처리와 오름차순 출력을 위한 TreeSet선언 public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in))..