# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
941397 | Darren0724 | File Paths (BOI15_fil) | C++17 | 102 ms | 33108 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define LCBorz ios_base::sync_with_stdio(false); cin.tie(0);
#define all(x) x.begin(), x.end()
#define endl '\n'
const int N=6005;
const int M=1000005;
const int INF=1e9;
int n,m,l,p;
vector<int> v(N),adj[N],ans(N),t(M,0),t1(M,0);
void dfs(int k,int pa){
for(int j:adj[k]){
if(j==pa)continue;
v[j]+=v[k];
dfs(j,k);
}
}
vector<int> h,h1;
vector<int> rec[N];
void dfs1(int k,int pa){
for(int j:h){
if(l-(v[k]-j)>=0&&t[l-(v[k]-j)]==1){
ans[k]=1;
}
}
h.push_back(v[k]);
for(int j:adj[k]){
if(j==pa)continue;
dfs1(j,k);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |