1
#include<iostream>
2
#include<stdlib.h>
3
using namespace std;
4
int cmp(const void *a, const void *b)
5

{
6
return(*(int *)a-*(int *)b);
7
}
8
int main()
9

{
10
int n, i,j,t2,flag=0;
11
char t1[300];
12
cin>>n;
13
int *rec=new int[n];
14
for(i=0;i<n;i++)
15
{
16
scanf("%s",&t1);
17
t2=0;
18
for(j=0; t1[j]!=0 ;j++)
19
{
20
21
switch(t1[j])
22
{
23
case '0': t2=t2*10+0;break;
24
case '1': t2=t2*10+1;break;
25
case '2': case 'A': case 'B': case 'C':
26
t2=t2*10+2;break;
27
case '3': case 'D': case 'E': case 'F':
28
t2=t2*10+3;break;
29
case '4': case 'G': case 'H': case 'I':
30
t2=t2*10+4;break;
31
case '5': case 'J': case 'K': case 'L':
32
t2=t2*10+5;break;
33
case '6': case 'M': case 'N': case 'O':
34
t2=t2*10+6;break;
35
case '7': case 'P': case 'R': case 'S':
36
t2=t2*10+7;break;
37
case '8': case 'T': case 'U': case 'V':
38
t2=t2*10+8;break;
39
case '9': case 'W': case 'X': case 'Y':
40
t2=t2*10+9;break;
41
}
42
43
}
44
rec[i]=t2;
45
}
46
qsort(rec,n,sizeof(rec[0]),cmp);
47
for(i=0;i<n;)
48
{
49
int temp=rec[i];
50
int rn=1;
51
for(j=i+1;j<n;j++)
52
{
53
i=j;
54
if(temp==rec[j])
55
rn++;
56
else
57
break;
58
}
59
if(rn>=2)
60
{
61
printf("%03d-%04d %d\n",temp/10000,temp%10000,rn);
62
flag=1;
63
}
64
65
if(j>=n) i++;
66
}
67
if(flag==0) cout<<"No duplicates.\n";
68
return 0;
69
}
70

2

3

4

5



6

7

8

9



10

11

12

13

14

15



16

17

18

19



20

21

22



23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48



49

50

51

52



53

54

55

56

57

58

59

60



61

62

63

64

65

66

67

68

69

70
