#define _GLIBCXX_DEBUG #include #include #include using namespace atcoder; using namespace std; typedef long long ll; #define rep(i,a,b) for(int i=a;i; using vvi = vector; using li =vector; using lli=vector
  • ; using si =vector; using ssi =vector; const long long INF = 1e18; const long long MOD=1e9+7; //for (auto [key, val] : mp) int main() { ll n,x;cin>>n>>x; //li vec(n); mapmp; rep(i,0,n){ll a;cin>>a;mp[a]++;} if(x==0){ll ans=0; for(auto [key,val]:mp){ ans+=val*(val-1)/2; } cout<