P2036 [COCI2008-2009#2] PERKET
n=int(input())
sour=[0]*11
bitter=[0]*11
for i in range(1,n+1):
sour[i],bitter[i]=map(int,input().split())
mark=[0]*11
a,b=1,0
sum=9999999999
def DFS(depth):
global sum,a,b
if depth>n:
return
for i in range(1,n+1):
# if mark[i]==0:
# mark[i]=1
a*=sour[i]
b+=bitter[i]
sum=min(sum,abs(a-b))
DFS(depth+1)
# mark[i]=0
a/=sour[i]
b-=bitter[i]
DFS(1)
print(sum)
P1618 三连击(升级版
a,b,c=map(int,input().split())
ans=[0]*10
mark=[0]*10
sum=0
flag=1
def