diff --git "a/suyeun84/202510/19 BOJ G5 \355\203\234\354\203\201\354\235\264\354\235\230 \355\233\210\353\240\250\354\206\214 \354\203\235\355\231\234.md" "b/suyeun84/202510/19 BOJ G5 \355\203\234\354\203\201\354\235\264\354\235\230 \355\233\210\353\240\250\354\206\214 \354\203\235\355\231\234.md" new file mode 100644 index 00000000..9a3ef6e5 --- /dev/null +++ "b/suyeun84/202510/19 BOJ G5 \355\203\234\354\203\201\354\235\264\354\235\230 \355\233\210\353\240\250\354\206\214 \354\203\235\355\231\234.md" @@ -0,0 +1,41 @@ +```java +import java.io.*; +import java.util.*; + +public class boj19951 { + static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + static StringTokenizer st; + static void nextLine() throws Exception {st = new StringTokenizer(br.readLine());} + static int nextInt() {return Integer.parseInt(st.nextToken());} + static StringBuilder sb = new StringBuilder(); + + public static void main(String[] args) throws Exception { + nextLine(); + int N = nextInt(); + int M = nextInt(); + int[] arr = new int[N+1]; + nextLine(); + for(int i=1; i