Submission #88037

#TimeUsernameProblemLanguageResultExecution timeMemory
88037jvalsortavGeppetto (COCI15_geppetto)Cpython 3
0 / 80
1080 ms45324 KiB
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 timeMemoryGrader output
Fetching results...