CiscoOA #6
Count Days with Odd Number of Birthdays
估计简单可在线判题
考点(AI 标注)哈希计数
Given the integer date identifier of each birthday celebration, count the distinct identifiers that occur an odd number of times. The answer is a count, not a particular date value that occurs an odd number of times; there may be several dates with odd counts.
输入格式
The first line contains N, and the second line contains N integers. The original gave no bounds on the count or the date values; this site uses 0≤N≤200000 and identifiers in −10^9..10^9, treated as abstract date labels and not further restricted to 1..31 because of the birthday story.
输出格式
Output a single integer, the answer.
样例 1
输入:
5
4 8 2 8 9
输出:
3
样例 2
输入:
8
3 3 3 7 7 7 7 7
输出:
2
样例 3
输入:
0
输出:
0
样例说明
The outputs of the three public examples are, in order: 3; 2; 0. Verified by independent enumeration or direct simulation.