Logo
(追記) (追記ここまで)

3514번 - High security 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 256 MB42266.667%

문제

Vasya is a system administrator of a new social network, named Five Contacts or just V Contacts. High security is very important in social networks. One of the problems is spammers, who can steal users’ passwords and send spam messages or do other bad things.

According to security policy of V Contacts each password consists of five lowercase or uppercase English letters or digits. Vasya wants to analyze a database of all users’ passwords in order to know its security level. The security level depends on how many pairs of passwords are the same, differ in one position, two positions, etc.

입력

The first line of the input file contains one integer number n — the total number of users of V Contacts (1 ≤ n ≤ 50 000).

Each of the following n lines contains a single user password.

출력

The output file should contain six numbers ai (0 ≤ i ≤ 5) — the number of pairs of passwords which are different in exactly i positions.

제한

예제 입력 1

3
abcde
ABCDE
12345

예제 출력 1

0 0 0 0 0 3

예제 입력 2

7
aaaaa
aaaaa
aaaa1
aaaA2
aaBCD
a6543
XxXxX

예제 출력 2

1 2 3 4 5 6

힌트

출처

ICPC > Regionals > Northern Eurasia > Northwestern Russia Regional Contest > NEERC Northern Subregional 2011 H번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /