# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
632020 | CyanForces | Thousands Islands (IOI22_islands) | C++17 | 317 ms | 36276 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "islands.h"
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define debug(...) //ignore
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef long double ld;
variant<bool, vi> find_journey(int n, int m, vi u, vi v) {
vi dead(n);
vector<set<int>> rg(n), g(n);
rep(i,0,m) {
g[u[i]].emplace(i);
rg[v[i]].emplace(i);
}
queue<int> q;
rep(x,0,n) if(sz(g[x]) == 0) q.emplace(x);
auto del = [&](int e) {
g[u[e]].erase(e);
rg[v[e]].erase(e);
if(sz(g[u[e]]) == 0) q.emplace(u[e]);
};
# | 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... |