# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
542506 | Olympia | Geppetto (COCI15_geppetto) | C++17 | 15 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.
#include <vector>
#include <algorithm>
#include <iostream>
#include <set>
#include <cmath>
#include <map>
#include <random>
#include <cassert>
#include <ctime>
#include <cstdlib>
#include <queue>
#include <limits.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int N, M; cin >> N >> M;
vector<pair<int,int>> vec;
for (int i = 0; i < M; i++) {
int x, y;
cin >> x >> y;
x--, y--;
vec.emplace_back(x, y);
}
int c = 0;
for (int i = 0; i < (1 << N); i++) {
bool fine = true;
for (auto& p: vec) {
if ((i & (1 << p.first)) && (i & (1 << p.second))) {
fine = false;
break;
}
}
c += fine;
}
cout << c;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |