QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#113181 | #4446. Link is as bear | Liuf# | WA | 217ms | 11000kb | C++20 | 752b | 2023-06-16 16:59:06 | 2023-06-16 16:59:08 |
Judging History
answer
#include<bits/stdc++.h>
#define endl '\n'
#define pii pair<int, int>
#define int long long
#define ld long double
using namespace std;
const int mod=1e9+7,M=2000010,Mlog=22;
void solve(){
int n;
cin>>n;
vector<int>a(n+1),b(n+1,0);
map<int,int>m;
for(int i=1;i<=n;i++){
cin>>a[i];
m[a[i]]=1;
}
if(m.size()==1){
for(auto [x,_]:m){
cout<<x<<endl;
return;
}
}
for(int i=1;i<=n;i++){
b[i]=b[i-1]^a[i];
}
cout<<b[n]<<endl;
}
signed main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t;
cin>>t;
while(t--){
solve();
}
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 217ms
memory: 11000kb
input:
22222 100000 595189703884863 72716684812661 449525802123580 504421888022388 390139608591346 108895143840760 170477720052912 185583843894744 201608404318832 128831549357316 521084715261656 668960191579878 573530403227342 489014525501629 56366633717911 1705111713690 227582321537214 710815946393065 169...
output:
367105242564297 80685774788852 905452073216932 800506481918522 913657452217541 299196809323710 667132970972809 121078747625910 167632099646865 737568965050208 22049392616706 711945311050738 1106277129968908 161653562054199 1108034298121334 707664136718665 712603298471237 681235366385653 929752393702...
result:
wrong answer 1st lines differ - expected: '1125899906842623', found: '367105242564297'