# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
961850 | NK_ | Povjerenstvo (COI22_povjerenstvo) | C++17 | 233 ms | 108840 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.
// Success consists of going from failure to failure without loss of enthusiasm
#include <bits/stdc++.h>
using namespace std;
#define nl '\n'
#define pb push_back
#define sz(x) int(x.size())
template<class T> using V = vector<T>;
using vi = V<int>;
int main() {
cin.tie(0)->sync_with_stdio(0);
int N, M; cin >> N >> M;
V<vi> radj(N); vi out(N), dead(N);
set<int> left; for(int i = 0; i < N; i++) left.insert(i);
vi q;
auto rem = [&](int u) {
left.erase(u);
for(auto& v : radj[u]) if (!dead[v]) {
out[v]--;
if (out[v] == 0) q.pb(v);
}
};
for(int i = 0; i < M; i++) {
# | 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... |