# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
121281 | TadijaSebez | Training (IOI07_training) | C++11 | 20 ms | 8448 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
const int N=1050;
const int L=10;
const int K=10;
vector<int> E[N];
struct Edge{ int u,v,c;Edge(){}Edge(int a, int b, int d):u(a),v(b),c(d){}};
vector<Edge> es;
vector<Edge> cyc[N];
int dep[N],par[N][L],deg[N],dp[N][1<<K],idx[N][N],full[N];
void DFS(int u, int p)
{
int cnt=0;
dep[u]=dep[p]+1;
par[u][0]=p;
for(int i=1;i<L;i++) par[u][i]=par[par[u][i-1]][i-1];
for(int i=0;i<E[u].size();i++)
{
int v=E[u][i];
if(v!=p)
{
idx[u][v]=cnt++;
DFS(v,u);
}
}
deg[u]=cnt;
full[u]=(1<<cnt)-1;
}
int LCA(int u, int v)
Compilation message (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... |
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |