# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
604778 | MilosMilutinovic | Geppetto (COCI15_geppetto) | C++14 | 536 ms | 332 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.
/**
* author: wxhtzdy
* created: 25.07.2022 11:41:41
**/
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<vector<bool>> g(n, vector<bool>(n));
for (int i = 0; i < m; i++) {
int a, b;
cin >> a >> b;
--a; --b;
g[a][b] = g[b][a] = true;
}
int ans = 0;
for (int t = 0; t < (1 << n); t++) {
bool ok = true;
for (int i = 0; i < n; i++) {
if (t >> i & 1) {
for (int j = 0; j < n; j++) {
if (t >> j & 1) {
ok = (ok & !g[i][j]);
}
}
}
}
if (ok) {
ans += 1;
}
}
cout << ans << '\n';
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |