| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 960485 | Isam | Geppetto (COCI15_geppetto) | C++17 | 1065 ms | 596 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;
int n, m, ans;
vector<int> tmp;
map<pair<int, int>, bool> mp;
signed main(){
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	cin >> n >> m;
	for(register int i = 1, u, v; i <= m; ++i){
		cin >> u >> v;
		mp[{u, v}] = mp[{v, u}] = true;
	}
	for(register int mask = 0; mask < (1 << n); ++mask){
		tmp.clear();
		for(register int i = 1; i <= n; ++i){
			if(mask & (1 << (i - 1))) tmp.emplace_back(i);
		}
		bool flag = true;
		
		for(auto to : tmp){
			for(auto toto : tmp){
				flag &= !mp[{to, toto}];
			}
		}
		
		ans += flag;
		
	}
	cout << ans << '\n';
	return 0;
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
