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;
pair<int,int> kor[250001];
vector<int> kol;
int main(){
int N,K;
cin>>N>>K;
for(int i=0;i<N;i++){
cin>>kor[i].first>>kor[i].second;
}
for(int i=0;i<N;i++){
for(int j=i+1;j<N;j++){
int raz=abs(kor[i].first-kor[j].first)+abs(kor[i].second-kor[j].second);
kol.push_back(raz);
}
}
sort(kol.begin(),kol.end());
for(int i=0;i<K;i++){
cout<<kol[i]<<endl;
}
return 0;
}
# | 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... |