eolymp
bolt
Try our new interface for solving problems
Məsələlər

High security

High security

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. \InputFile The first line of the input file contains one integer number \textbf{n} - the total number of users of \textbf{V} Contacts (\textbf{1} ≤ \textbf{n} ≤ \textbf{50000}). Each of the following \textbf{n} lines contains a single user password. \OutputFile The output file should contain six numbers \textbf{a_i} (\textbf{0} ≤ \textbf{i} ≤ \textbf{5}) - the number of pairs of passwords which are different in exactly \textbf{i} positions.
Zaman məhdudiyyəti 3 saniyə
Yaddaşı istafadə məhdudiyyəti 256 MiB
Giriş verilənləri #1
3
abcde
ABCDE
12345
Çıxış verilənləri #1
0 0 0 0 0 3