# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
690855 | Aiperiii | Table Tennis (info1cup20_tabletennis) | C++14 | 3057 ms | 3648 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(){
long long n,k;
cin>>n>>k;
vector <long long> a(n+k),vec;
for(int i=0;i<n;i++){
cin>>a[i];
vec.push_back(a[i]);
}
if(n==2){
cout<<a[0]<<" "<<a[1];
return 0;
}
for(int i=0;i<n+k;i++){
map <long long,long long> 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... |