【Henu ACM Round#15 B】A and B and Compilation Errors

【链接】 我是链接,点我呀:)
【题意】

在这里输入题意

【题解】

开3个map, 存在map里面; 然后迭代第一个和第二个map; 分别与第二个和第三个map比较就可以了

【代码】

#include <bits/stdc++.h>
using namespace std;

const int N = 1e5;

map<int,int> m[3];
int n;

int main()
{
    cin >> n;
    for (int i = 0;i<3;i++){
        for (int j = 1;j <= n-i;j++){
            int x;
            cin >> x;
            m[i][x]++;
        }
    }
    int x;
    for (auto temp:m[0]){
        int dd = temp.first,ee = temp.second;
        if (m[1][dd]!=ee){
            x = dd;
            break;
        }
    }
    int y;
    for (auto temp:m[1]){
        int dd = temp.first,ee = temp.second;
        if (m[2][dd]!=ee){
            y = dd;
            break;
        }
    }
    cout << x <<' '<<y<<endl;
    return 0;
}
原文地址:https://www.cnblogs.com/AWCXV/p/8350605.html