ACM Southwestern European Regional Programming Contest (SWERC) 2017 A map+暴力

//暴力+map的应用
#include
#include
#include
#include
using namespace std;
typedef long long LL;
const int maxn=2000+5;
mapstr;
int main()
{
    int n,m;
    scanf("%d",&n);
    scanf("%d",&m);
    int a[maxn],b[maxn];
    for(int i=0;i         scanf("%d",&a[i]);
    for(int i=0;i         {
            scanf("%d",&b[i]);
            for(int j=0;j             {
                if(b[i]>=a[j]) str[b[i]-a[j]]++;
                else break;
            }
        }
    map::iterator it;
    int temp=0;
    LL ans;
    for(it=str.begin();it!=str.end();it++)
    {
        if(tempsecond) {
                temp=it->second;
                ans=it->first;
        }
    }
    cout<     str.clear();
    return 0;
}

你可能感兴趣的:(STL)