Submission #13287650


Source Code Expand

Copy
import math

n = int(input())


def cho(i):
    return (i * (i - 1)) // 2


d = {}
for i in range(n):
    s = "".join(sorted(input()))
    if s in d:
        d[s] += 1
    else:
        d[s] = 0

_ans = 0
for k, v in d.items():
    if v == 0: continue
    _ans += cho(v + 1)

print(_ans)

Submission Info

Submission Time
Task C - Green Bin
User kazzzz1001
Language Python (3.4.3)
Score 300
Code Size 311 Byte
Status AC
Exec Time 378 ms
Memory 17848 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 17 ms 3060 KB
a02 AC 17 ms 3060 KB
a03 AC 17 ms 3060 KB
b04 AC 17 ms 3060 KB
b05 AC 346 ms 4952 KB
b06 AC 346 ms 4936 KB
b07 AC 355 ms 3060 KB
b08 AC 374 ms 17844 KB
b09 AC 366 ms 17848 KB
b10 AC 378 ms 17844 KB
b11 AC 363 ms 3060 KB
b12 AC 364 ms 10536 KB
b13 AC 21 ms 3060 KB