using namespace std;
#define INPUT_OPTIMIZE
#define OUTPUT_OPTIMIZE
#define INLINE_OPTIMIZE
#define USING_MMAP
#define ONLY_BLANK
const int maxn=2000005;
#ifdef USING_MMAP
#ifdef __unix__
#define UINT16_OPTIMIZE
#endif
#endif
namespace IO{
constexpr int Read_Bufsize=1<<21|20;
constexpr int Write_Bufsize=1<<21|20;
#ifdef INLINE_OPTIMIZE
#define IOINLINE [[gnu::always_inline]] inline
#else
#define IOINLINE inline
#endif
#define mmap_init() 0
#ifdef INPUT_OPTIMIZE
#ifdef __unix__
#ifdef USING_MMAP
#include<fcntl.h>
#include<sys/mman.h>
#include<sys/stat.h>
#include<unistd.h>
#undef mmap_init
constexpr int fd=0;
static const unsigned char *p1;
struct stat stat_;
IOINLINE void mmap_init(){
fstat(fd,&stat_);
p1=(const unsigned char*)mmap(NULL,stat_.st_size,PROT_READ,MAP_PRIVATE,fd,0);
}
#define getchar() (*p1++)
#else
static unsigned char buf[Read_Bufsize],*p1=buf,*p2=buf;
#define getchar() (p1==p2&&(p2=(p1=buf)+fread_unlocked(buf,1,Read_Bufsize,stdin),p1==p2)?EOF:*p1++)
#endif
#else
static unsigned char buf[Read_Bufsize],*p1=buf,*p2=buf;
#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,Read_Bufsize,stdin),p1==p2)?EOF:*p1++)
#endif
#endif
#ifdef UINT16_OPTIMIZE
struct uint16_table{
int table[65540];
constexpr uint16_table():table{}{
for(int i=0;i<65536;++i) table[i]=-1;
for(int i=48;i!=58;++i)
for(int j=48;j!=58;++j)
table[i<<8|j]=(j&15)*10+(i&15);
}
};
constexpr uint16_table Table;
#define TABLE Table.table
#endif
IOINLINE bool read(unsigned char *t){
memset(t,0,256);
unsigned char *pd=t,c=getchar();
while(isspace(c)) c=getchar();
while(!isspace(c)) *pd++=c,c=getchar();
return c==EOF;
}
template<typename T>
IOINLINE bool read(T &t){
t=0;T sgn=1;
int c=getchar();
#ifdef UINT16_OPTIMIZE
#ifdef ONLY_BLANK
if(c<=32) c=getchar();
if(c==45) sgn=-1,c=getchar();
#else
while(!isdigit(c)) {if(c==45) sgn*=-1;c=getchar();}
#endif
#define xio_next __builtin_expect(!!~TABLE[*(uint16_t*)(p1-1)],1)&&((t=TABLE[*(uint16_t*)(p1-1)],p1+=2))
#define io_next (~TABLE[*(uint16_t*)(p1-1)])&&((t=t*100+TABLE[*(uint16_t*)(p1-1)],p1+=2))
xio_next&&io_next&&io_next&&io_next;
c=*(p1-1);
#ifdef ONLY_BLANK
if(c>32) t=t*10+(c&15),++p1;
#else
if(isdigit(c)) t=t*10+(c&15),++p1;
#endif
#else
#ifdef ONLY_BLANK
while(c<=32) c=getchar();
if(c==45) sgn=-1,c=getchar();
while(c>32) t=t*10+(c&15),c=getchar();
#else
while(!isdigit(c)) {if(c==45)sgn*=-1;c=getchar();}
while(isdigit(c)) t=t*10+(c&15),c=getchar();
#endif
#endif
t*=sgn;
return c==EOF;
}
template<typename T,typename... Args>
IOINLINE bool read(T &t,Args&... args){
return read(t)?1:read(args...);
}
#ifdef OUTPUT_OPTIMIZE
static unsigned char outbuf[Write_Bufsize],*out=outbuf;
#define putchar(x) (*out++=x)
#define flush() fwrite(outbuf,1,out-outbuf,stdout)
struct auto_flush{auto_flush(){atexit([](){flush();});}}initializer;
#else
#define flush() 0
#endif
template<typename T>
IOINLINE void write(T x){
if(!x) return putchar(48),void();
static unsigned char t[9],p=0;
while(x) t[++p]=(x%10)&15,x/=10;
while(p) putchar(t[p--]);
}
}
using namespace IO;
signed main(){
mmap_init();
int n,ans=0,i=0;
read(n);
for(int num;i+1<n;i+=2)
read(num),ans^=num,read(num),ans^=num;
if(n&1){
int num;
read(num),ans^=num;
}
printf("%d",ans);
}
剪贴板
剪贴板 2vc0s3nm
剪贴板信息
剪贴板信息
- 收录
- 更新