Submission #3245637


Source Code Expand

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define i_7 (ll)(1E9+7)
#define i_5 (ll)(1E9+5)
ll mod(ll a){
    ll c=a%i_7;
    if(c>=0)return c;
    else return c+i_7;
}
typedef pair<int,int> i_i;
typedef pair<ll,ll> l_l;
ll inf=(ll)1E12;//10^12
#define rep(i,l,r) for(ll i=l;i<=r;i++)
#define pb push_back
ll max(ll a,ll b){if(a<b)return b;else return a;}
ll min(ll a,ll b){if(a>b)return b;else return a;}
////////////////////////////////////////



int main(){
    ios::sync_with_stdio(false);cin.tie(0);
    
    map<string,int>m;
    int n;cin>>n;
    while(n--){
        string s;cin>>s;
        m[s]++;
    }
    cin>>n;
    while(n--){
        string s;cin>>s;
        m[s]--;
    }
    int ans=0;
    for(auto ite=m.begin();ite!=m.end();ite++){
        if(ite->second>ans)ans=ite->second;
    }cout<<ans<<endl;
    
    return 0;
}

Submission Info

Submission Time
Task B - Two Colors Card Game
User sugarrr
Language C++14 (GCC 5.4.1)
Score 200
Code Size 906 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 4
AC × 11
Set Name Test Cases
Sample example_0, example_1, example_2, example_3
All example_0, example_1, example_2, example_3, rand_0, rand_1, rand_2, rand_3, rand_4, rand_5, rand_6
Case Name Status Exec Time Memory
example_0 AC 1 ms 256 KB
example_1 AC 1 ms 256 KB
example_2 AC 1 ms 256 KB
example_3 AC 1 ms 256 KB
rand_0 AC 1 ms 256 KB
rand_1 AC 1 ms 256 KB
rand_2 AC 1 ms 256 KB
rand_3 AC 1 ms 256 KB
rand_4 AC 1 ms 256 KB
rand_5 AC 1 ms 256 KB
rand_6 AC 1 ms 256 KB