# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
196966 | mahmoudbadawy | Pipes (BOI13_pipes) | C++17 | 275 ms | 29432 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
const int M=5e5+5;
const int N=1e5+5;
int n,m;
int ans[M],arr[N],co[N];
vector<pair<int,int> > adj[N];
int cur;
vector<pair<int,int> > adj2[M];
int vis[N];
int dfs1(int node,int p,int co,int pa)
{
if(co==cur) return 0;
for(auto i:adj2[node])
{
if(i.F==pa) continue;
return i.S*p+dfs1(i.F,-1*p,co+1,node);
}
}
void dfs2(int node,int co,int pa)
{
if(co==cur) return;
for(auto i:adj2[node])
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |