这道题用C++代码怎么实现?
Phone numbers
Businesses like to have memorable telephone numbers . One way to makea telephone number memorable 15 to have it spell a memorable word or phrase . For example , you can call the University ofw 叔terioo by dialing the memorable TUT - GLOP . Sometimes only part ofthe number 15 used to spell a word . When you get back to your hotel tonight you can order a pizza from Gino , 5 by dialing 3 10 一CINO . Another way to make a telephone number memorable 15 to group the digits ina memorable way . You could order your pizza from Pizza Htlt by calling their " three tens , , number3 一10 一10 一10 . The standard form of a telephone number 15 seven decimal digits with a hyphen between the third and fourth digits ( e . g . 888 一1200 ) . The keypad of a phone supplies the mapping of letters to numbers , as follows : A , B , and C map to ZD , E , and F map to 3G , H , and 1 map to 4J , K , and L map to SM , N , and 0 map to 6 P , R , and 5 map to 7 T , U , and V map to 8 W , X , and Y map to 9 There 15 no mapping for Q or 2 . Hyphens are not dialed , and can be added and removed as necessary . The standard form of TUT - GLOP 15 888 一4567 , the standard form of 3 10 一CINO 15 3 10 一4466 , and the standard form of3 一10 一10 一10 15 310 一1010 . Two telephone numbers are equivalent if they have the same standard form . ( They dial the same number . ) Your company 15 compiling a directory of telephone numbers from local businesses . As part ofthe quality control process you want to check that no two ( or more ) businesses in the directory have the same telephone number .
Input :
The input Will consist of one case . The first line ofthe input specifies the number of telephone numbers in the directory ( u p to 100 , 000 ) as a positive integer alone on the line . The remaining lines list the telephone numbers in the directory , with each number alone on a line . Each telephone number consists of a string composed of decimal digits , uppercase letters ( excluding Q andZ ) and hyphens . Exactly seven of the characters in the string will be digits or letters .
output :
Generate a line of output for each telephone number that appears more than once in any form . The line should give the telephone number in standard form , followed by a space , followed by the number oftimesthetelephonenumberappearsinthe directory . Arrange the output lines by telephone number in ascending lexicographical order . If there are no duplicates in the input print the line : No duplicates .
Sample Input
l2
4873279
ITS 一EASY
888 一4567
3 一10 一10 一10
888 一CLOP
TUT 一CLOP
967 一11 一11
3 10 一CINO
F 101010
888 一1200
一4 一8 一7 一3 一2 一7 一9 - 487 一3279
Sample output
310 一1010 2
487 一3279 4
888 一4567 3