# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
992339 | 2024-06-04T09:41:43 Z | Kalata_56 | Road Construction (JOI21_road_construction) | C++14 | 510 ms | 43064 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; } } sort(kol.begin(),kol.end()); for(long long i=0;i<K;i++){ cout<<kol[i]<<endl; } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 268 ms | 5056 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 509 ms | 37300 KB | Output is correct |
2 | Correct | 510 ms | 38324 KB | Output is correct |
3 | Correct | 293 ms | 5056 KB | Output is correct |
4 | Incorrect | 433 ms | 37300 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 345 ms | 38324 KB | Output is correct |
2 | Correct | 367 ms | 39096 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 143 ms | 38088 KB | Output is correct |
5 | Correct | 198 ms | 38584 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 345 ms | 38324 KB | Output is correct |
2 | Correct | 367 ms | 39096 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 143 ms | 38088 KB | Output is correct |
5 | Correct | 198 ms | 38584 KB | Output is correct |
6 | Correct | 333 ms | 38240 KB | Output is correct |
7 | Correct | 342 ms | 42792 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 342 ms | 43064 KB | Output is correct |
11 | Correct | 143 ms | 41396 KB | Output is correct |
12 | Correct | 198 ms | 43064 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 268 ms | 5056 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 268 ms | 5056 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |