#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <set>
#include <iostream>
using namespace std;
int main( )
{
set<int>q;
int N,i,t;
while (scanf("%d",&N), N)
{
q.clear( );
for (i = 0; i < N; i++)
{
scanf("%d",&t);
if(!q.insert(t).second)
q.erase(t);
}
for(set<int>::iterator iter = q.begin(); iter != q.end( ); iter++)
printf("%d\n",*iter);
}
return 0;
}
转载于:https://www.cnblogs.com/tangcong/archive/2011/07/29/2120873.html