From 7ea4847d99f0e450fd6af4101c0fc301c5171bee Mon Sep 17 00:00:00 2001 From: RangKoon <162738215+RangKoon@users.noreply.github.com> Date: Thu, 18 Jul 2024 13:56:38 +0900 Subject: [PATCH] Create S4_1620 --- .../S4_1620" | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 "\354\247\204\353\257\274\355\230\201/S4_1620" diff --git "a/\354\247\204\353\257\274\355\230\201/S4_1620" "b/\354\247\204\353\257\274\355\230\201/S4_1620" new file mode 100644 index 0000000..2f6e033 --- /dev/null +++ "b/\354\247\204\353\257\274\355\230\201/S4_1620" @@ -0,0 +1,25 @@ +import java.util.*; +import java.io.*; + +public class Main { + public static void main(String[] args) throws IOException { + BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + String[] input = br.readLine().split(" "); + int n = Integer.parseInt(input[0]); + int m = Integer.parseInt(input[1]); + HashMap map = new HashMap<>(); + + for(int i=1; i<=n; i++) { + String s1 = Integer.toString(i); + String s2 = br.readLine(); + map.put(s1, s2); + map.put(s2, s1); + } + StringBuilder sb = new StringBuilder(); + for(int i=0; i