# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
415424 | 2021-06-01T05:23:24 Z | 조영욱(#7635) | Road Construction (JOI21_road_construction) | C++17 | 2169 ms | 2097156 KB |
#include <bits/stdc++.h> using namespace std; typedef pair<long long,long long> P; P arr[250000]; int main(void) { int n,k; scanf("%d %d",&n,&k); for(int i=0;i<n;i++) { scanf("%lld %lld",&arr[i].first,&arr[i].second); } vector<long long> ret; for(int i=0;i<n;i++) { for(int j=i+1;j<n;j++) { ret.push_back(abs(arr[i].first-arr[j].first)+abs(arr[i].second-arr[j].second)); } } sort(ret.begin(),ret.end()); for(int i=0;i<k;i++) { printf("%lld\n",ret[i]); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 85 ms | 6952 KB | Output is correct |
2 | Correct | 82 ms | 6884 KB | Output is correct |
3 | Correct | 56 ms | 5040 KB | Output is correct |
4 | Correct | 57 ms | 5020 KB | Output is correct |
5 | Correct | 77 ms | 5788 KB | Output is correct |
6 | Correct | 27 ms | 4540 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2109 ms | 2097156 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2169 ms | 2097156 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2169 ms | 2097156 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 85 ms | 6952 KB | Output is correct |
2 | Correct | 82 ms | 6884 KB | Output is correct |
3 | Correct | 56 ms | 5040 KB | Output is correct |
4 | Correct | 57 ms | 5020 KB | Output is correct |
5 | Correct | 77 ms | 5788 KB | Output is correct |
6 | Correct | 27 ms | 4540 KB | Output is correct |
7 | Runtime error | 2070 ms | 2097156 KB | Execution killed with signal 9 |
8 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 85 ms | 6952 KB | Output is correct |
2 | Correct | 82 ms | 6884 KB | Output is correct |
3 | Correct | 56 ms | 5040 KB | Output is correct |
4 | Correct | 57 ms | 5020 KB | Output is correct |
5 | Correct | 77 ms | 5788 KB | Output is correct |
6 | Correct | 27 ms | 4540 KB | Output is correct |
7 | Runtime error | 2109 ms | 2097156 KB | Execution killed with signal 9 |
8 | Halted | 0 ms | 0 KB | - |