# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
690022 | Aiperiii | Table Tennis (info1cup20_tabletennis) | C++14 | 58 ms | 2252 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,m;
cin>>n>>m;
vector <int> a(n+m);
for(int i=0;i<n+m;i++){
cin>>a[i];
}
sort(a.begin(),a.end());
int x=a[1]-a[0];
vector <int> vec;
vec.push_back(0);
for(int i=0;i<a.size()-1;i++){
if(a[i+1]-a[i]!=x){
x=(a[i+1]-a[i]);
vec.push_back(i+1);
}
}
vec.push_back(n+m);
for(int i=0;i<vec.size();i++){
if(vec[i+1]-vec[i]==n){
for(int j=vec[i];j<vec[i+1];j++){
cout<<a[j]<<" ";
}
return 0;
}
}
}
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... |