Skip to content

Instantly share code, notes, and snippets.

@jaideepheer
Created July 14, 2019 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaideepheer/d36a37aab7287b46329e9ee9c641c1b9 to your computer and use it in GitHub Desktop.
Save jaideepheer/d36a37aab7287b46329e9ee9c641c1b9 to your computer and use it in GitHub Desktop.
#include<iostream>
#include<bitset>
#define MAXN 100000
using namespace std;
int main()
{
bitset<MAXN> b;
unsigned long n, in, i;
cin>>n;
i=n;
while(i--)
{
cin>>in;
b.flip(--in);
}
i=n;
while(i--)
{
if(b.test(i))cout<<(i+1)<<endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment