Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
ss = [sorted(input()) for i in range(n)]
cnt = 0
counter = Counter(ss)
for k, v in counter.items():
  cnt += 1
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
ss = [sorted(input()) for i in range(n)]
cnt = 0
counter = Counter(ss)
for k, v in counter.items():
  cnt += v*(v-1)/2
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)

Buggy python submission (verdict: Runtime Error):
n = int(input())
ss = [sorted(input()) for i in range(n)]
cnt = 0
dic = {}
for s in ss:
  if s not in dic.keys():
    dic[s]=1
  else:
    dic[s]+=1
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)

Buggy python submission (verdict: Runtime Error):
n = int(input())
ss = [sorted(input()) for i in range(n)]
cnt = 0
dic = {}
for s in ss:
  if s not in dic.keys():
    dic[s]=1
  else :
    dic[s]+=1
for v in dic.values():
  cnt += v*(v-1)/2
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ss = [sorted(input()) for i in range(n)]
cnt = 0
for i in range(n):
  for j in range(i):
    if ss[i]==ss[j]:
      cnt+=1
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
ss = [sorted(input()) for i in range(n)]
dic = Counter(ss)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)

Buggy python submission (verdict: Runtime Error):
n = int(input())
ss = [sorted(input()) for i in range(n)]
cnt=0
dic = {}
for s in ss:
  if s not in dic.keys():
    dic[s] = 1
  else :
    dic[s] += 1
for v in dic.values():
  cnt += v
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
ss = [sorted(input()) for i in range(n)]
dic = Counter(ss)
cnt=0
for k, v in dic.items():
  cnt += int(v)
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
ss = [sorted(input()) for i in range(n)]
dic = Counter(ss)
cnt=0
for k, v in dic.items():
  cnt += v
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
ss = [sorted(input()) for i in range(n)]
dic = Counter(ss)
cnt=0
for k, v in dic:
  cnt += v
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ss = [sorted(input()) for i in range(n)]
cnt=0
for i in range(n):
  for j in range(i+1, n):
    if ss[i]==ss[j]:
      cnt+=1
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n = int(input())
dic = [Counter(input()) for i in range(n)]
cnt=0
for i in range(n):
  for j in range(i+1, n):
    if dic[i]==dic[j]:
      cnt+=1
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
string_set=set(string_list)
cnt=0
for s in string_set:
  n=string_list.count(s)
  cnt+=int(n*(n-1)/2)
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)

Buggy python submission (verdict: Runtime Error):
n=int(input())
string_list=[sorted(input()) for i in range(n)]
string_set=set(string_list)
cnt=0
for s in string_set:
  n=string_list.count(s)
  cnt+=int(n*(n-1)/2)
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n=int(input())
string_list=[Counter(input()) for i in range(n)]
string_set=set(string_list)
cnt=0
for s in string_set:
  n=string_list.count(s)
  cnt+=int(n*(n-1)/2)
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n=int(input())
string_list=[Counter(input()) for i in range(n)]
cnt=0
for i in range(n):
  si = string_list[i]
  for j in range(i+1, n):
    sj = string_list[j]
    if si==sj:
      cnt += 1
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n=int(input())
string_list=[sorted(Counter(input()), key=lambda x:x[0]) for i in range(n)]
cnt=0
for i in range(n):
  si = string_list[i]
  for j in range(i, n):
    sj = string_list[j]
    if si.items() == sj.items():
      cnt += 1
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)