# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
132324 | bogdan10bos | 007 (CEOI14_007) | C++14 | 367 ms | 25100 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.
/// 00:04 why?
#include <bits/stdc++.h>
using namespace std;
const int NMAX = 2e5 + 5;
int N, M, S, D, A, B;
vector<int> edg[NMAX];
vector<int> BFS(int start)
{
vector<int> d(N + 1, 1 << 30);
d[start] = 0;
queue<int> q;
q.push(start);
while(!q.empty())
{
int nod = q.front();
q.pop();
for(auto nxt: edg[nod])
if(d[nxt] > d[nod] + 1)
{
d[nxt] = d[nod] + 1;
q.push(nxt);
}
}
return d;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |