UCF “Practice” Local Contest — Aug 25, 2018 Boots Exchange 水题

Posted 2aptx4869

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了UCF “Practice” Local Contest — Aug 25, 2018 Boots Exchange 水题相关的知识,希望对你有一定的参考价值。

技术图片

 

 

 

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

int n;
set <int> a;
map <int,int> cnt;

int main()
{
    cin >> n; int ans = 0;
    for (int i = 1; i <= n; ++i) 
    {
        int x; cin >> x; 
        a.insert(x);
        ++cnt[x];
    }
    for (int i = 1; i <= n; ++i)
    {
        int x; cin >> x;
        if(a.count(x) && cnt[x]) --cnt[x];
        else ans++;
    }
    cout << ans << endl;
    return 0;
}

 

以上是关于UCF “Practice” Local Contest — Aug 25, 2018 Boots Exchange 水题的主要内容,如果未能解决你的问题,请参考以下文章

UCF Local Programming Contest 2015(Practice)个人分析

UCF Local Programming Contest 2012(Practice)

UCF “Practice” Local Contest — Aug 25, 2018 Rummy Score

UCF “Practice” Local Contest — Aug 25, 2018 Call Me Maybe

UCF “Practice” Local Contest — Aug 25, 2018 Boots Exchange 水题

UCF Local Programming Contest 2015