# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
88037 | jvalsortav | Geppetto (COCI15_geppetto) | Cpython 3 | 1080 ms | 45324 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.
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)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |