# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
666167 | bin9638 | 007 (CEOI14_007) | C++17 | 209 ms | 18680 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 N 200010
#define ll long long
#define ii pair<int,int>
#define fs first
#define sc second
#define pb push_back
int dp[N][5],f[5],n,m;
vector<int>g[N];
deque<int>dq;
void build(int id)
{
dp[f[id]][id]=0;
dq.pb(f[id]);
while(!dq.empty())
{
int u=dq.front();
dq.pop_front();
for(auto v:g[u])
if(dp[v][id]>dp[u][id]+1)
{
dp[v][id]=dp[u][id]+1;
dq.pb(v);
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |