# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
628390 | haojiandan | 수천개의 섬 (IOI22_islands) | C++17 | 121 ms | 20108 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "islands.h"
#include <bits/stdc++.h>
using namespace std;
#define MP make_pair
const int maxn=(1e5)+10;
int n,m; vector<int> bk[maxn];
int out[maxn],q[maxn],hd,tl;
bool del[maxn];
vector<int> ans,vec,res;
vector<pair<int,int> > g[maxn];
int to[maxn];
int d[maxn],t1,e[maxn],t2;
int pos[maxn],vis[maxn],To[maxn];
int D[maxn],E[maxn];
int at[maxn*2];
variant<bool,vector<int> > find_journey(int _n,int _m,vector<int> U,vector<int> V) {
n=_n,m=_m;
for (int i=0;i<m;i++) bk[V[i]].push_back(U[i]),g[U[i]].push_back(MP(V[i],i)),out[U[i]]++;
int x=0;
for (int i=0;i<n;i++) if (!out[i]) q[++tl]=i,del[i]=1; hd=1;
while (hd<=tl||out[x]==1) {
while (hd<=tl) {
int x=q[hd]; hd++;
for (int &y : bk[x]) { out[y]--; if (!out[y]) q[++tl]=y,del[y]=1; }
}
while (out[x]==1) {
del[x]=1;
for (int &y : bk[x]) { out[y]--; if (!out[y]&&!del[y]) q[++tl]=y,del[y]=1; }
bool fd=0;
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |