# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
971061 | imann | Amusement Park (CEOI19_amusementpark) | C++17 | 3100 ms | 6740 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 <iostream>
#include <array>
#include <algorithm>
using ll = long long;
const int MAX_N = 18 + 1;
const ll MOD = 998244353;
std::array<std::array<bool, MAX_N>, MAX_N> graph;
std::array<ll, (1 << MAX_N)> dp, sSize;
std::array<bool, (1 << MAX_N)> sInd;
ll solve(int n) {
sInd.fill(true);
for (int s = 0; s < (1 << n); ++s) {
int c = 0;
for (int i = 0; i < n; ++i) {
if (s & (1 << i)) {
for (int j = 0; j < n; ++j) {
if (s & (1 << j)) {
if (graph[i][j]) {
sInd[s] = false;
}
}
}
c++;
}
}
sSize[s] = c;
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... |