목록문제/백준_자바 (102)
sm 기술 블로그
import java.util.*; import java.io.*; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBuilder(); int N = Integer.parseInt(br.readLine()); Deque queue = new ArrayDeque(); for (int i = 0; i < N; i++) { String[] tmp = br.readLine().split(" "); String S; int num = 0; if(tmp..
import java.util.*; import java.io.*; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBuilder(); int T = Integer.parseInt(br.readLine()); for(int i =0; i< T; i++) { String[] tmp = br.readLine().split(" "); int N = Integer.parseInt(tmp[0]); int M = Integer.parseInt(tmp[1..
import java.util.*; import java.io.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); StringBuilder sb = new StringBuilder(); int N = sc.nextInt(); int K = sc.nextInt(); Deque queue = new ArrayDeque(); for (int i = 1; i