import java.util.LinkedHashMap; import java.util.Scanner; public class Main { public static void main(String[] args) { LinkedHashMap <Integer,Integer>map=new LinkedHashMap<>(); Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int m=sc.nextInt(); for (int i = 0; i < n; i++) { int a=sc.nextInt(),b=sc.nextInt(); map.put(a, b); } for (int i = 0; i < m; i++) { int a=sc.nextInt(),b=sc.nextInt(); if(map.containsKey(a)) map.remove(a); } System.out.println(map.size()); for (Integer i :map.keySet()) { System.out.println(i+" "+map.get(i)); } System.out.println(); } }
0.0分
0 人评分
程序员的表白 (C语言代码)浏览:1472 |
C语言程序设计教程(第三版)课后习题4.9 (C语言代码)浏览:1523 |
C语言训练-数字母 (C语言代码)浏览:649 |
C语言程序设计教程(第三版)课后习题8.3 (C语言代码)浏览:1099 |
wu-理财计划 (C++代码)浏览:837 |
C语言程序设计教程(第三版)课后习题4.9 (C语言代码)浏览:635 |
A+B for Input-Output Practice (V) (C语言代码)浏览:470 |
模拟计算器 (C++代码)浏览:807 |
数组与指针的问题浏览:718 |
淘淘的名单 (C语言代码)浏览:1229 |