// a ^ (b ^ b) ^ (c ^ c) ^ ... ^ (n ^ n) = a
#include <iostream>
using namespace std;
int main(int argc, char **argv) {
int n;
while (cin >> n && n) {
int res, tmp, nt = n - 1;
cin >> res;
while (nt--) {
cin >> tmp;
res ^= tmp;
}
cout << res << endl;
}
return 0;
}
Sicily 1200. Stick
最新推荐文章于 2016-07-05 20:56:05 发布
