# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
46776 | Waschbar | Bosses (BOI16_bosses) | C++17 | 1319 ms | 1528 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.
///©Waschbar
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5000;
const int INF = 1e9;
const long long MOD = 1e9+7;
int n, ans;
vector < vector < int > > g(MAXN+1);
int solve(int f) {
vector <int> siz(n+1,0);
vector <bool> used(n+1,0);
queue <int> Q;
stack < pair<int,int> > st;
Q.push(f);
st.push({f,0});
used[f] = 1;
while(!Q.empty()){
f = Q.front();
Q.pop();
for(int i = 0; i < g[f].size(); i++){
int to = g[f][i];
if(used[to]) continue;
Q.push(to);
st.push({to,f});
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |