# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
397164 | giorgikob | Bosses (BOI16_bosses) | C++14 | 844 ms | 24032 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 ff first
#define ss second
#define pb push_back
using namespace std;
const int N = 1e6+50, mod = 1e9+7, K = 31;
int n,k,x;
ll answer,res;
vector<int>gr[N];
bool fix[N];
int cnt = 0;
void bfs(int x){
queue<pair<int,int>>q;
q.push({x,1});
fix[x] = 1;
while(q.size()){
auto p = q.front();
q.pop();
int x = p.ff;
int h = p.ss;
cnt++;
res += h;
for(auto to : gr[x]){
if(fix[to]) continue;
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... |