# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
933755 | LucaIlie | Political Development (BOI17_politicaldevelopment) | C++17 | 2087 ms | 29044 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>
using namespace std;
struct pv {
int u, a;
bool operator < ( const pv &x ) const {
if ( a == x.a )
return u < x.u;
return a < x.a;
}
};
const int MAX_N = 5e4;
const int MAX_K = 10;
int perm[MAX_N], pos[MAX_N];
unordered_set<int> adj[MAX_N];
set<pv> vertMinSize;
int solve( vector<int> vertices ) {
int n = vertices.size();
for ( int i = 0; i < n; i++ )
pos[vertices[i]] = i;
int ans = 0;
for ( int mask = 0; mask < (1 << n); mask++ ) {
vector<int> v;
for ( int i = 0; i < n; i++ ) {
if ( (mask >> i) & 1)
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |