diff --git "a/\354\234\240\353\263\221\352\267\234_15\354\243\274\354\260\250/[BOJ-18119] \353\213\250\354\226\264 \354\225\224\352\270\260.java" "b/\354\234\240\353\263\221\352\267\234_15\354\243\274\354\260\250/[BOJ-18119] \353\213\250\354\226\264 \354\225\224\352\270\260.java" new file mode 100644 index 00000000..31802bf9 --- /dev/null +++ "b/\354\234\240\353\263\221\352\267\234_15\354\243\274\354\260\250/[BOJ-18119] \353\213\250\354\226\264 \354\225\224\352\270\260.java" @@ -0,0 +1,51 @@ +import java.io.*; +import java.util.*; + +public class Main { + + public static void main(String[] args) throws IOException { + BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + + StringTokenizer st = new StringTokenizer(br.readLine()); + int n = Integer.parseInt(st.nextToken()); + int m = Integer.parseInt(st.nextToken()); + + //단어 저장 + List words = new ArrayList<>(); + for(int i=0; i Integer.compare(o1[0], o2[0])); + + int result = 0; + int pre = 0; + for(int i=0; i