# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
738173 | Ronin13 | Hotspot (NOI17_hotspot) | C++14 | 900 ms | 7032 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>
#define ll long long
#define f first
#define s second
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define epb emplace_back
#define ull unsigned ll
using namespace std;
const int nmax = 200001;
vector <vector <int> > g(nmax);
vector <double> ans(nmax);
int n;
void BFS(int a, int b){
queue <int> q;
vector <int> dp(n + 1, 0);
dp[a] = 1;
vector <int> d(n + 1, 1e9);
d[a] = 0;
q.push(a);
while(!q.empty()){
int v = q.front(); q.pop();
for(int to : g[v]){
if(d[to] == d[v]) continue;
if(d[to] > d[v]) dp[to] += dp[v];
if(d[to] == 1e9) d[to] = d[v] + 1, q.push(to);
}
# | 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... |