比赛 | 位运算及及其应用题单 | 评测结果 | AAAAAAAAAA |
---|---|---|---|
题目名称 | 异或加密 | 最终得分 | 100 |
用户昵称 | zqy | 运行时间 | 1.046 s |
代码语言 | C++ | 内存使用 | 3.49 MiB |
提交时间 | 2025-01-25 11:47:49 | ||
#include <iostream> #include <cstdio> using namespace std; int n,a,b; int main(){ freopen("XORcipher.in","r",stdin); freopen("XORcipher.out","w",stdout); scanf("%d",&n); for(int i=1,x;i<=n;i++)scanf("%d",&x),a^=x; for(int i=1,x;i<=n;i++)scanf("%d",&x),b^=x; printf("%d\n",a^b); return 0; }