n, q = map(int,input().split())
a = []
l = (1<<n)
t = l
for i in range(l):
a += [i]
for i in range(q):
x, y = map(int,input().split())
for j in range (len(a)):
if a.count(j) and j&(1<<(x-1)) and j&(1<<(y-1)):
a.remove(j)
if (not q):
print(len(a))
else:
print(len(a) - 1)
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
416 ms |
3300 KB |
Output isn't correct |
2 |
Incorrect |
190 ms |
3432 KB |
Output isn't correct |
3 |
Execution timed out |
1054 ms |
45052 KB |
Time limit exceeded |
4 |
Execution timed out |
1080 ms |
45224 KB |
Time limit exceeded |
5 |
Execution timed out |
1072 ms |
45224 KB |
Time limit exceeded |
6 |
Execution timed out |
1072 ms |
45224 KB |
Time limit exceeded |
7 |
Execution timed out |
1039 ms |
45224 KB |
Time limit exceeded |
8 |
Execution timed out |
1072 ms |
45224 KB |
Time limit exceeded |
9 |
Execution timed out |
1072 ms |
45224 KB |
Time limit exceeded |
10 |
Execution timed out |
1066 ms |
45324 KB |
Time limit exceeded |