# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
110754 | Mahdi_Jfri | 007 (CEOI14_007) | C++14 | 417 ms | 19692 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 ll long long
#define pb push_back
const int maxn = 2e5 + 20;
vector<int> adj[maxn];
int d[3][maxn] , x[maxn];
void bfs(int src , int k)
{
memset(d[k] , 63 , sizeof d[k]);
queue<int> q;
q.push(src);
d[k][src] = 0;
while(!q.empty())
{
int v = q.front();
q.pop();
for(auto u : adj[v])
if(d[k][u] > d[k][v] + 1)
{
d[k][u] = d[k][v] + 1;
q.push(u);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |