#include <iostream>
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define ll long long
int main()
{
ios_base::sync_with_stdio(false);cin.tie(NULL);
int n, k;
cin >> n >> k;
vector<int> b(n+k);
for(int i=0; i<n+k; i++){
cin >> b[i];
}
if(k==1 && n<=2000){
for(int i=0; i<n+k; i++){
int l=0;
int r=n;
int currSt = -1;
bool f=true;
while(l<r){
if(l==i){
l++;
}
else if(r==i){
r--;
}
if(currSt==-1){
currSt = b[l]+b[r];
}
else{
if((b[l]+b[r])!=currSt){
f = false;
break;
}
}
l++;
r--;
}
if(f){
for(int j=0; j<n+k; j++){
if(j!=i){
cout << b[j] << " ";
}
}
return 0;
}
}
}
else{
cout << "I be liking that dude braids like ;p" << endl;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |