# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
389316 | rama_pang | Worst Reporter 4 (JOI21_worst_reporter4) | C++17 | 724 ms | 122576 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int N;
cin >> N;
vector<int> A(N), H(N), C(N);
for (int i = 0; i < N; i++) {
cin >> A[i] >> H[i] >> C[i];
A[i]--;
}
{ // Coordinate Compression
vector<int> coords;
for (int i = 0; i < N; i++) {
coords.emplace_back(H[i]);
}
sort(begin(coords), end(coords));
coords.resize(unique(begin(coords), end(coords)) - begin(coords));
for (int i = 0; i < N; i++) {
H[i] = lower_bound(begin(coords), end(coords), H[i]) - begin(coords);
}
}
const auto Solve = [&](vector<int> component) -> long long {
// Cycle + Tree graph
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |