Submission #13288178


Source Code Expand

Copy
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll GCD(ll x,ll y){
    if(y == 0) return x;
    else return GCD(y,x%y);
}
const int MOD = 1000000007;

int main() {
    int n; cin >> n;string s[n];
    map<string,long double> ma;
    int cnt = 0;
    for(int i = 0;i < n;i++){
        string x; cin >> x;
        sort(x.begin(),x.end());
        ma[x]++;
    }
   long double sum  = 0;
      for(auto e:ma){
          long double tmp = e.second*(e.second-1)/2;
          sum += tmp;
      }
    cout<<sum<<endl;
}

Submission Info

Submission Time
Task C - Green Bin
User yutaosa
Language C++14 (GCC 5.4.1)
Score 0
Code Size 560 Byte
Status WA
Exec Time 190 ms
Memory 13568 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 3
AC × 10
WA × 3
Set Name Test Cases
Sample a01, a02, a03
All a01, a02, a03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13
Case Name Status Exec Time Memory
a01 AC 1 ms 256 KB
a02 AC 1 ms 256 KB
a03 AC 1 ms 256 KB
b04 AC 1 ms 256 KB
b05 AC 113 ms 2816 KB
b06 AC 121 ms 2816 KB
b07 WA 104 ms 1024 KB
b08 AC 190 ms 13568 KB
b09 AC 181 ms 13312 KB
b10 AC 177 ms 13568 KB
b11 WA 89 ms 1024 KB
b12 WA 158 ms 9472 KB
b13 AC 3 ms 384 KB