The first line of input contains N (1≤N≤200,000), the number of cities on the map.The next N lines
each contain two strings: the name of a city (a string of at least 2 and at most 10 uppercase lette
rs), and its two-letter state code (a string of 2 uppercase letters). Note that the state code may b
e something like ZQ, which is not an actual USA state. Multiple cities with the same name can exist,
but they will be in different states.
依次给出N(1≤N≤200,000)个城市名及其州的代码(州代码保证仅有两位)。我们说,两个城市是一个“特殊对
”,如果他们来自不同的州且A城市的州代码是B城市的城市名首两位,B城市的州代码是A城市的城市名首两位。问
:在给定的信息中有多少个“特殊对”?