Submission #19563559


Source Code Expand

Copy
n = int(input())
s = list(input() for _ in range(n))
t = []
for i in range(n):
    ti = list(s[i][j] for j in range(len(s[i])))
    t.append(sorted(ti))
t.sort()
cnt = [1]*n
for i in range(n-1):
    if t[i+1] == t[i]:
        cnt[i+1] += cnt[i]
print(sum(cnt)-n)

Submission Info

Submission Time
Task C - Green Bin
User Katsuhito
Language Python (3.8.2)
Score 300
Code Size 273 Byte
Status AC
Exec Time 533 ms
Memory 41176 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 30 ms 9192 KB
a02 AC 21 ms 9012 KB
a03 AC 19 ms 9012 KB
b04 AC 22 ms 8908 KB
b05 AC 509 ms 38032 KB
b06 AC 512 ms 38160 KB
b07 AC 481 ms 40352 KB
b08 AC 533 ms 38100 KB
b09 AC 521 ms 37928 KB
b10 AC 525 ms 38036 KB
b11 AC 383 ms 41176 KB
b12 AC 473 ms 39284 KB
b13 AC 30 ms 9172 KB