Submission #19560151


Source Code Expand

Copy
# C Green Bin

from collections import Counter

N = int(input())

Ss = {}
for i in range(N):
  s = str(sorted(input()))
  if s in Ss:
    Ss[s] += 1
  else:
    Ss[s] = 1

ans = 0
for cnt in Ss.values():
  ans += cnt*(cnt-1)//2

print(ans)

Submission Info

Submission Time
Task C - Green Bin
User chicken1227
Language Python (3.8.2)
Score 300
Code Size 257 Byte
Status AC
Exec Time 332 ms
Memory 26516 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 13
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 29 ms 9244 KB
a02 AC 31 ms 9376 KB
a03 AC 29 ms 9260 KB
b04 AC 24 ms 9148 KB
b05 AC 289 ms 11376 KB
b06 AC 298 ms 11516 KB
b07 AC 293 ms 9200 KB
b08 AC 325 ms 26516 KB
b09 AC 332 ms 26340 KB
b10 AC 320 ms 26312 KB
b11 AC 289 ms 9400 KB
b12 AC 312 ms 19116 KB
b13 AC 25 ms 9588 KB