# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
789058 | Username4132 | Povjerenstvo (COI22_povjerenstvo) | C++14 | 402 ms | 101108 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
#define forn(i, n) for(int i=0; i<(int)n; ++i)
#define PB push_back
const int MAXN = 500010;
int n, m, cn;
bool vis[MAXN], ans[MAXN], del[MAXN];
vector<int> g[MAXN], gi[MAXN], order, toDel;
void dfs1(int v){
vis[v]=true;
for(int to:gi[v]) if(!vis[to]) dfs1(to);
order.PB(v);
}
void dfs2(int v, bool flag){
del[v]=true;
if(flag){
ans[v]=true;
for(int to:gi[v]) toDel.PB(to);
}
for(int to:g[v]) if(!del[to]) dfs2(to, !flag);
}
int main(){
scanf("%d %d", &n, &m);
forn(i, m){
컴파일 시 표준 에러 (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... |