# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
992296 | 2024-06-04T08:53:53 Z | Kalata_56 | Road Construction (JOI21_road_construction) | C++14 | 363 ms | 38600 KB |
#include<bits/stdc++.h> using namespace std; pair<long long,long long> kor[250001]; vector<long long> kol; int main(){ long long N,K; cin>>N>>K; for(long long i=0;i<N;i++){ cin>>kor[i].first>>kor[i].second; } sort(kor,kor+N); for(int k=1;k<N;k++){ for(long long i=k;i<N;i++){ long long raz=abs(kor[i].first-kor[i-k].first)+abs(kor[i].second-kor[i-k].second); kol.push_back(raz); } if(kol.size()>=K && k>=10){ break; } } for(long long i=0;i<K;i++){ cout<<kol[i]<<endl; } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 251 ms | 5052 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 363 ms | 38600 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 151 ms | 37812 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 151 ms | 37812 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 251 ms | 5052 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 251 ms | 5052 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |