# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1015988 | qnicondavid23 | Bosses (BOI16_bosses) | C++14 | 472 ms | 860 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 <vector>
#include <iostream>
#include <queue>
using namespace std;
//ifstream cin("date.in");
//ofstream cout("date.out");
int n;
int x, a;
vector<vector<int>> A;
vector<int> fr;
int sum;
void bfs(int nod)
{
queue<int> Q;
Q.push(nod);
fr[nod] = 1;
sum = 1;
while (!Q.empty())
{
int cap = Q.front();
Q.pop();
for (int i = 0; i < A[cap].size(); i++)
{
int vecin = A[cap][i];
if (!fr[vecin])
{
fr[vecin] = fr[cap]+1;
sum = sum + fr[vecin];
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... |