# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1166628 | Choco | Bosses (BOI16_bosses) | C++20 | 488 ms | 2656 KiB |
#include<bits/stdc++.h>
using namespace std;
#define Study ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ll long long
#define ull unsigned long long
#define pb push_back
#define ff first
#define ss second
#define ins insert
#define all(x) x.begin(),x.end()
#define fori(x,y,z) for(ll x=y;x<=z;x++)
const ll INF=1e18;
const ll sz=5e4+10;
const ll mod=1e9+7;
vector<vector<ll>>graph(sz);
vector<ll>check(sz,0),subt(sz,0);
ll bfs(ll t){
check[t]=1;
queue<ll>q;
stack<pair<ll,ll>>parents;
q.push(t);
while(!q.empty()){
ll node=q.front();
q.pop();
for(auto x: graph[node]){
if(!check[x]){
q.push(x);
parents.push({x,node});
check[x]=1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |