比赛 位运算及及其应用题单 评测结果 AAAAAAAAAA
题目名称 异或加密 最终得分 100
用户昵称 长安惊龙灵松 运行时间 0.932 s
代码语言 C++ 内存使用 3.53 MiB
提交时间 2025-01-25 11:08:41
显示代码纯文本
#include<bits/stdc++.h>
using namespace std;
int n,x,ans;
int main()
{
    freopen("XORcipher.in","r",stdin);
    freopen("XORcipher.out","w",stdout);
    scanf("%d",&n);
    for(int i=1;i<=2*n;i++)
    {
        scanf("%d",&x);
        ans^=x;
    }
    printf("%d",ans);
    return 0;
}