# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
691281 | Aiperiii | Table Tennis (info1cup20_tabletennis) | C++14 | 3051 ms | 4492 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;
vector <int> a(n+k),ans;
for(int i=0;i<n+k;i++){
cin>>a[i];
ans.push_back(a[i]);
}
if(k==1){
for(int i=0;i<n+k;i++){
ans.erase(ans.begin()+i);
map <int,int> mp;
for(int j=0;j<ans.size()-1;j++){
mp[ans[j+1]-ans[j]]++;
}
if(mp.size()==1){
break;
}
else{
ans.insert(ans.begin()+i,a[i]);
}
}
}
for(int i=0;i<n;i++){
cout<<ans[i]<<" ";
}
}
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... |