#include <bits/stdc++.h>
using namespace std;
const int mxN=2e5;
int n, k, a[mxN];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cin >> n >> k;
n+=k;
map<int, int> mp;
for(int i=0; i<n; ++i)
cin >> a[i], ++mp[a[i]];
sort(a, a+n);
int cnt=0, pos=1;
for(int i=0; i<n; ++i) {
if(!mp[a[i]])
continue;
int nd=a[0]+a[n-1]-a[i];
if(!mp[nd])
++cnt, pos=i;
}
if(cnt==1) {
for(int i=0; i<n; ++i)
if(i^pos^1)
cout << a[i] << " ";
return 0;
}
for(int i=0; i<n-1; ++i)
cout << a[i] << " ";
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
620 KB |
Output does not have symmetry property |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
16 ms |
1772 KB |
Output does not have symmetry property |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
116 ms |
17900 KB |
Output does not have symmetry property |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Extra information in the output file |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
492 KB |
Extra information in the output file |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Extra information in the output file |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Extra information in the output file |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Extra information in the output file |
2 |
Halted |
0 ms |
0 KB |
- |