# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1053317 | fuad27 | Keys (IOI21_keys) | C++17 | 2969 ms | 2097152 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;
vector<int> u, v, c;
struct node {
set<int> cols;
vector<int> goodEdges;
set<int> curnodes;
map<int,vector<int>> badEdges;
int cntEdges=0;
int getGoodEdge() {
while(goodEdges.size()) {
if(curnodes.find(u[goodEdges.back()])==curnodes.end())break;
if(curnodes.find(v[goodEdges.back()])==curnodes.end())break;
goodEdges.pop_back();
}
if(goodEdges.size())return goodEdges.back();
return -1;
}
bool isHere(int vv) {
if(curnodes.find(vv)!=curnodes.end())return true;
return false;
}
};
struct dsu {
vector<int> e;
int cc=0;
dsu(int n) {
e=vector<int>(n, -1);
cc=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... |