# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
155941 | Akashi | 007 (CEOI14_007) | C++14 | 437 ms | 18016 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;
int n, m;
bool viz[200005];
int s, d, a, b;
int da[200005], db[200005], ds[200005], dd[200005];
queue <int> q;
vector <int> v[200005];
void bfs(int nod, int d[]){
for(int i = 1; i <= n ; ++i) d[i] = 1e9;
memset(viz, 0, sizeof(viz));
q.push(nod);
d[nod] = 0; viz[nod] = 1;
while(!q.empty()){
int nod = q.front();
q.pop();
for(auto it : v[nod]){
if(viz[it]) continue ;
q.push(it);
viz[it] = 1;
d[it] = d[nod] + 1;
}
}
}
int main()
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |