# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
940618 | WonderfulWhale | Library (JOI18_library) | C++17 | 9 ms | 692 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>
#include"library.h"
using namespace std;
#define pb push_back
#define pii pair<int, int>
#define st first
#define nd second
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
int N;
vector<vector<int>> V;
bool f(vector<int> v, int X, int exl=-1) {
vector<int> q(N, 0);
q[X] = 1;
bool skip = false;
for(int x:v) {
if(x==exl) {
skip = true;
continue;
}
for(int y:V[x])
q[y] = 1;
}
//cerr << "we want to achieve: " << sz(v)-skip << "\n";
return Query(q)==sz(v)-skip;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |