Submission #992270

#TimeUsernameProblemLanguageResultExecution timeMemory
992270Kalata_56Road Construction (JOI21_road_construction)C++14
0 / 100
1807 ms2097152 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...