# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
952865 |
2024-03-25T03:40:18 Z |
Darren0724 |
양말 찾기 (KPI13_socks) |
C++17 |
|
1 ms |
1628 KB |
#include <bits/stdc++.h>
using namespace std;
#define LCBorz ios_base::sync_with_stdio(false); cin.tie(0);
#define int long long
#define all(x) x.begin(), x.end()
#define endl '\n'
const int N=200005;
const int INF=1e18;
const int K=35000;
int32_t main() {
LCBorz;
int n;cin>>n;
vector<int> v(K),v1(K);
for(int i=0;i<n;i++){
int p;cin>>p;
v[p%K]^=p;
v1[p/K]^=p;
}
int cnt1=0;
for(int i=0;i<K;i++){
cnt1+=(v[i]>0);
}
if(cnt1==2){
for(int i=0;i<K;i++){
if(v[i])cout<<v[i]<<' ';
}
cout<<endl;
return 0;
}
for(int i=0;i<K;i++){
if(v1[i])cout<<v1[i]<<' ';
}
cout<<endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
860 KB |
Output is correct |
2 |
Correct |
1 ms |
860 KB |
Output is correct |
3 |
Correct |
1 ms |
860 KB |
Output is correct |
4 |
Correct |
1 ms |
860 KB |
Output is correct |
5 |
Runtime error |
1 ms |
1628 KB |
Execution killed with signal 11 |
6 |
Halted |
0 ms |
0 KB |
- |