1. 程式人生 > >【Henu ACM Round#15 B】A and B and Compilation Errors

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

main mpi map def ror () auto span error

【鏈接】 我是鏈接,點我呀:)
【題意】


在這裏輸入題意

【題解】


開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; }

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