总结:
下次组合数 只用求那种 C[2,n]这种 不需要用板子
code:
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long LL;
map<LL,LL> mp;
int n;
const int N1 = 2e5+10;
int a[N1];
inline void read(int &sum)
{char ch = getchar();int tf = 0;sum = 0;while((ch < '0' || ch > '9') && (ch != '-')) ch = getchar();tf = ((ch == '-') && (ch = getchar()));while(ch >= '0' && ch <= '9') sum = sum * 10+ (ch - 48), ch = getchar();(tf) && (sum =- sum);
}signed main()
{cin>>n;for(int i=1; i<=n; i++){read(a[i]);mp[a[i]%200]++;}LL sum = 0;map<LL ,LL>::iterator it;for(it=mp.begin(); it!=mp.end(); it++){if(it->second >=2)sum+=((it->second*(it->second-1))/2);}cout<<sum;return 0;
}