Buggy python submission (verdict: Time Limit Exceeded):
n,a,b = map(int, input().split())
mod = 10**9+7
 
def minus(n,k):
    x,y =1,1
    for i in range(k):
        x*=(n-i)%mod
        y*=(k-i)%mod
    return x*pow(y, mod-2, mod)%mod
 
ans = pow(2,n,mod)-1-minus(n,a)-minus(n,b)
while ans<0:
    ans+=mod
print(ans)

Fixed submission:
n,a,b = map(int, input().split())
mod = 10**9+7

def minus(n,k):
    x,y =1,1
    for i in range(k):
        x=x*(n-i)%mod
        y=y*(k-i)%mod
    return x*pow(y, mod-2, mod)%mod

ans = pow(2,n,mod)-1-minus(n,a)-minus(n,b)
while ans<0:
    ans+=mod
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,a,b = (int(x) for x in input().split())
mod = 10**9+7

def minus(n,k):
    x,y =1,1
    for i in range(k):
        x*=(n-i)%mod
        y*=(k-i)%mod
    return x*pow(y, mod-2, mod)%mod

ans = pow(2,n,mod)-1-minus(n,a)-minus(n,b)
while ans<0:
    ans+=mod
print(ans)


Fixed submission:
n,a,b = map(int, input().split())
mod = 10**9+7

def minus(n,k):
    x,y =1,1
    for i in range(k):
        x=x*(n-i)%mod
        y=y*(k-i)%mod
    return x*pow(y, mod-2, mod)%mod

ans = pow(2,n,mod)-1-minus(n,a)-minus(n,b)
while ans<0:
    ans+=mod
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,a,b = (int(x) for x in input().split())
mod = 10**9+7

def minus(k):
    x,y =1,1
    for i in range(k):
        x*=(n-i)%mod
        y*=(k-i)%mod
    return x*pow(y, mod-2, mod)%mod

ans = pow(2,n,mod)-1-minus(a)-minus(b)
while ans<0:
    ans+=mod
print(ans)


Fixed submission:
n,a,b = map(int, input().split())
mod = 10**9+7

def minus(n,k):
    x,y =1,1
    for i in range(k):
        x=x*(n-i)%mod
        y=y*(k-i)%mod
    return x*pow(y, mod-2, mod)%mod

ans = pow(2,n,mod)-1-minus(n,a)-minus(n,b)
while ans<0:
    ans+=mod
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,a,b = (int(x) for x in input().split())
mod = 10**9+7

def minus(k):
    x,y =1,1
    for i in range(k):
        x*=(n-i)%mod
        y*=(k-i)%mod
    return x*pow(y, mod-2, mod)%mod

ans = pow(2,n,mod)-1-minus(a)-minus(b)
if ans<0:
    ans+=mod
print(ans)


Fixed submission:
n,a,b = map(int, input().split())
mod = 10**9+7

def minus(n,k):
    x,y =1,1
    for i in range(k):
        x=x*(n-i)%mod
        y=y*(k-i)%mod
    return x*pow(y, mod-2, mod)%mod

ans = pow(2,n,mod)-1-minus(n,a)-minus(n,b)
while ans<0:
    ans+=mod
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,a,b = (int(x) for x in input().split())
mod = 10**9+7

def minus(k):
    x,y =1,1
    for i in range(k):
        x*=(n-i)%mod
        y*=(k-i)%mod
    return x*pow(y, mod-2, mod)%mod

ans = pow(2,n,mod)-1-minus(a)-minus(b)
while ans<0:
    ans+=mod
print(ans%mod)


Fixed submission:
n,a,b = map(int, input().split())
mod = 10**9+7

def minus(n,k):
    x,y =1,1
    for i in range(k):
        x=x*(n-i)%mod
        y=y*(k-i)%mod
    return x*pow(y, mod-2, mod)%mod

ans = pow(2,n,mod)-1-minus(n,a)-minus(n,b)
while ans<0:
    ans+=mod
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,a,b = (int(x) for x in input().split())
mod = pow(10,9)+7

def minus(k):
    x,y =1,1
    for i in range(k):
        x*=(n-i)%mod
        y*=(k-i)%mod
    return x*pow(y, mod-2, mod)%mod

ans = pow(2,n,mod)-1-minus(a)-minus(b)
while ans<0:
    ans+=mod
print(ans%mod)


Fixed submission:
n,a,b = map(int, input().split())
mod = 10**9+7

def minus(n,k):
    x,y =1,1
    for i in range(k):
        x=x*(n-i)%mod
        y=y*(k-i)%mod
    return x*pow(y, mod-2, mod)%mod

ans = pow(2,n,mod)-1-minus(n,a)-minus(n,b)
while ans<0:
    ans+=mod
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,a,b=(int(x) for x in input().split())
mod=1000000007
n1=int(n/2)
list=[1]
for i in range(n1):
	k=list[i]*(n-i)/(i+1)
	k%=mod
	list.append(k)
su=sum(list)%mod
su*=2
if n%2==0:
	su-=list[n1]
if 2*a>n:
	a=n-a
if 2*b>n:
	b=n-b
su-=list[a]
su-=list[b]
su-=1
print(int(su%mod))

Fixed submission:
n,a,b = map(int, input().split())
mod = 10**9+7

def minus(n,k):
    x,y =1,1
    for i in range(k):
        x=x*(n-i)%mod
        y=y*(k-i)%mod
    return x*pow(y, mod-2, mod)%mod

ans = pow(2,n,mod)-1-minus(n,a)-minus(n,b)
while ans<0:
    ans+=mod
print(ans)

Buggy python submission (verdict: Runtime Error):
n,a,b=(int(x) for x in input().split())
mod=1000000007
n1=int(n/2)
list=[1]
for i in range(n1):
	k=list[i]*(n-i)/(i+1)
	k%=mod
	list.append(k)
su=sum(list)%mod
su*=2
if n%2==0:
	su-=list[n1]
if 2*a>=n:
	a=n1-(a/2)
if 2*b>=n:
	b=(n1-int(b/2))
su-=list[a]
su-=list[b]
su-=1
print(int(su%mod))

Fixed submission:
n,a,b = map(int, input().split())
mod = 10**9+7

def minus(n,k):
    x,y =1,1
    for i in range(k):
        x=x*(n-i)%mod
        y=y*(k-i)%mod
    return x*pow(y, mod-2, mod)%mod

ans = pow(2,n,mod)-1-minus(n,a)-minus(n,b)
while ans<0:
    ans+=mod
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,a,b=(int(x) for x in input().split())
mod=1000000007
list=[n]
for i in range(n-1):
	k=list[i]*(n-i-1)/(i+2)
	k%=mod
	list.append(k)
#print(list)
su=sum(list)%mod
su-=list[a-1]
su-=list[b-1]
print(int(su%mod))

Fixed submission:
n,a,b = map(int, input().split())
mod = 10**9+7

def minus(n,k):
    x,y =1,1
    for i in range(k):
        x=x*(n-i)%mod
        y=y*(k-i)%mod
    return x*pow(y, mod-2, mod)%mod

ans = pow(2,n,mod)-1-minus(n,a)-minus(n,b)
while ans<0:
    ans+=mod
print(ans)