# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
374047 | ritul_kr_singh | Bosses (BOI16_bosses) | C++17 | 1453 ms | 1132 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.
//#pragma GCC optimize("Ofast,unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define sp << " " <<
#define nl << "\n"
vector<vector<int>> g0, g1;
vector<bool> vis;
signed main(){
ios_base::sync_with_stdio(false); cin.tie(nullptr);
int n; cin >> n;
g0.resize(n);
g1.resize(n);
vis.resize(n);
for(int i=0; i<n; ++i){
int k; cin >> k;
for(int j=0; j<k; ++j){
int x; cin >> x;
g0[x-1].push_back(i);
}
}
int curr[n];
int ans = 1e18;
for(int root=0; root<n; ++root){
for(int i=0; i<n; ++i){
vis[i] = false;
g1[i].clear();
curr[i] = 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... |