# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
597556 | MilosMilutinovic | Regions (IOI09_regions) | C++14 | 8071 ms | 48368 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.
/**
* author: wxhtzdy
* created: 16.07.2022 11:38:01
**/
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n, r, q;
cin >> n >> r >> q;
vector<vector<int>> g(n);
vector<int> reg(n);
for (int i = 0; i < n; i++) {
if (i > 0) {
int p;
cin >> p;
--p;
g[p].push_back(i);
}
cin >> reg[i];
--reg[i];
}
vector<vector<int>> ids(r);
for (int i = 0; i < n; i++) {
ids[reg[i]].push_back(i);
}
int BLOCK = 350;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |