import java.util.HashMap; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); HashMap<Integer, Integer> map = new HashMap<>(); for (int i = 0; i < N + M; i++) { map.put(sc.nextInt(), sc.nextInt()); } for (Integer key : map.keySet()) { System.out.println(key + " " + map.get(key)); } } }
解题思路:
注意事项:
参考代码:
0.0分
0 人评分