找出没有重复的数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

给定n个正整数aia_i,其中有一个数只出现了一次,其他的数都出现了两次。请找出这个只出现一次的数 。 例如这组数据是:1, 2, 3, 4, 5, 1, 2, 3, 4。其中 5 只出现了一次,其他都出现了两次。

输入格式

第一行为整数n。 第2至n+1行为n个正整数aia_i

输出格式

对于100%的数据,1n106,0ai2301≤n≤10^6,0≤a_i≤2^{30}

9
1
2
3
4
5
1
2
3
4
5

20251012编程挑战精英赛训练

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
51
Start at
2025-9-24 15:00
End at
2025-11-5 7:00
Duration
1000 hour(s)
Host
Partic.
58