Submission #915645

#TimeUsernameProblemLanguageResultExecution timeMemory
9156450xZeroBurza (COCI16_burza)C++17
Compilation error
0 ms0 KiB
#include "template_light.h" #define bs bitset<mx> const int mx=400; int n, k; vi adj[mx]; int dep[mx], mxd[mx]={0}; void dfs(int u, int e){ mxd[u]=dep[u]; each(i, adj[u])if(i!=e){ dep[i]=dep[u]+1; dfs(i, u); mxd[u]=max(mxd[u], mxd[i]); } } bool f(int x, int y, const bs &b){ if(x==y)return 0; bs c(0); bool ans=0; F0R(i, n)if(b[i])each(j, adj[i])if(dep[j]>dep[i] && mxd[j]>=y)c[j]=1; if(c.count()<=1)return 1; F0R(i, n)if(c[i]){ c[i]=0; ans|=f(x+1, y, c); c[i]=1; } return ans; } int main(){ IOS; re(n, k); rep(n-1){ int a, b; re(a, b); a--;b--; adj[a].pb(b); adj[b].pb(a); } dep[0]=0; dfs(0, -1); bs b(1); if(f(0, k, b))pr("DA"); else pr("NE"); return 0; }

Compilation message (stderr)

burza.cpp:1:10: fatal error: template_light.h: No such file or directory
    1 | #include "template_light.h"
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.