Submission #13287649


Source Code Expand

Copy
#include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
#include<iomanip>
#include<map>
using namespace std;
typedef long long ll;

int main() {
    int n; cin >> n;
    map<string, int> vec;
    for (int i = 0; i < n; i++) {
        string s;
        cin >> s;
        sort(s.begin(), s.end());
        vec[s] += 1 ;
    }

    ll ans = 0;
    for (auto v : vec) {
        ans += v.second * (v.second - 1) / 2;
    }
    cout << ans << endl;
}

Submission Info

Submission Time
Task C - Green Bin
User miyaoka
Language C++14 (GCC 5.4.1)
Score 0
Code Size 487 Byte
Status WA
Exec Time 181 ms
Memory 11136 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 3
AC × 12
WA × 1
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 111 ms 1920 KB
b06 AC 114 ms 1920 KB
b07 AC 96 ms 256 KB
b08 AC 181 ms 11136 KB
b09 AC 162 ms 11008 KB
b10 AC 162 ms 11136 KB
b11 WA 87 ms 256 KB
b12 AC 141 ms 7680 KB
b13 AC 2 ms 384 KB