Submission #154043

# Submission time Handle Problem Language Result Execution time Memory
154043 2019-09-17T21:59:56 Z jvalsortav Geppetto (COCI15_geppetto) C++14
0 / 80
162 ms 65540 KB
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <cctype>
#include <ctime>
#include <set>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <utility>
#include <string>
#include <map>
 
using namespace std;
 
int n, b, x, y, m, l;
vector <int> v;
 
int main() {
	
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	
	cin >> n;
	l = (1<<n);
	b = l;
	/*cout << s.size();*/
	cin >> m;
	
	for (int i = 0; i < m; i++){
		cin >> x >> y;
		for (int i = 0; i < l; i++){ 
			if (i&(1<<(x-1)) and i&(1<<(y-1))){
				/*cout << i << endl;*/
				v.push_back(i);
			}
		}
	}
	cout << l - v.size();
 
 
 
return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 1016 KB Output isn't correct
2 Incorrect 2 ms 504 KB Output isn't correct
3 Runtime error 151 ms 65540 KB Execution killed with signal 9 (could be triggered by violating memory limits)
4 Runtime error 148 ms 65540 KB Execution killed with signal 9 (could be triggered by violating memory limits)
5 Runtime error 146 ms 65536 KB Execution killed with signal 9 (could be triggered by violating memory limits)
6 Runtime error 150 ms 65540 KB Execution killed with signal 9 (could be triggered by violating memory limits)
7 Runtime error 153 ms 65540 KB Execution killed with signal 9 (could be triggered by violating memory limits)
8 Runtime error 162 ms 65540 KB Execution killed with signal 9 (could be triggered by violating memory limits)
9 Incorrect 48 ms 16936 KB Output isn't correct
10 Incorrect 12 ms 4588 KB Output isn't correct