| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1343651 | avighna | Road Construction (JOI21_road_construction) | C++20 | 2363 ms | 2106144 KiB |
#include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
#define int int64_t
int n, k;
cin >> n >> k;
vector<pair<int, int>> a(n);
for (auto &[x, y] : a) {
cin >> x >> y;
}
vector<int> costs;
for (int i = 0; i < n; ++i) {
for (int j = i + 1; j < n; ++j) {
costs.push_back(abs(a[i].first - a[j].first) + abs(a[i].second - a[j].second));
}
}
sort(costs.begin(), costs.end());
for (int i = 0; i < k; ++i) {
cout << costs[i] << '\n';
}
}| # | 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... | ||||
