# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
690839 | Aiperiii | Table Tennis (info1cup20_tabletennis) | C++14 | 3061 ms | 2168 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,k;
cin>>n>>k;
n+=k;
vector <int> a(n),vec;
for(int i=0;i<n;i++){
cin>>a[i];
vec.push_back(a[i]);
}
sort(vec.begin(),vec.end());
for(int i=0;i<a.size();i++){
map <int,int> mp;
vec.erase(vec.begin()+i);
for(int j=0;j<vec.size()-1;j++){
mp[vec[j+1]-vec[j]]++;
}
if(mp.size()==1){
break;
}
vec.insert(vec.begin()+i,a[i]);
}
for(int j=0;j<vec.size();j++){
cout<<vec[j]<<" ";
}
}
Compilation message (stderr)
# | 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... |