3578

kenandkid1999
logpum

ClarenceChen

N=110
mod=1000000007
f=[[[0]*N for i in range(N)]for j in range(N)]

f[0][0][2]=1
n,m=map(int,input().split())
k=2
for i in range(n+1):
for j in range(m+1):
for k in range(m+1):    #遇到的花店最多100个，当k大于了100以后，这种方案不合法，因为到了终点的酒的数量一定大于0
if k%2==0 and i>=1:
f[i][j][k]=(f[i][j][k]+f[i-1][j][k//2])%mod
if j>=1:
f[i][j][k]=(f[i][j][k]+f[i][j-1][k+1])%mod
print(f[n][m-1][1])


n,m,k=map(int,input().split())
num=0
q=[[0]*(m+10) for i in range(n+10)]
s=[[0]*(m+10) for i in range(n+10)]
for i in range(1,n+1):
q[i]=[0]+list(map(int,input().split()))

for i in range(1,n+1):
for j in range(1,m+1):
s[i][j]=q[i][j]+s[i][j-1]+s[i-1][j]-s[i-1][j-1]

for x1 in range(1,n+1):
for y1 in range(1,m+1):
for x2 in range(x1,n+1):
for y2 in range(y1,m+1):
ans=s[x2][y2]-s[x2][y1-1]-s[x1-1][y2]+s[x1-1][y1-1]
if ans<=k:
num+=1
print(num)


n=int(input())
for i in range(1,n+1):
a=max(2*(i-1),2*(n-i))
print(a)


a,b,n=map(int,input().split())
week=5*a+2*b
ans=n//week*7   #周数*7
n=n%week        #剩下题数

cnt=0
for i in range(1,8):
if cnt>=n:
break
if i==6 or i==7:
cnt+=b
else:
cnt+=a
ans+=1
print(ans)


TLE(8/11)

from math import sqrt
n=int(input())
for i in range(1,n+1):
a=i*n
if int(sqrt(a))*int(sqrt(a))==a:
print(i)
break


ans=0
n=int(input())
for i in range(1,n):
if (i*i)%n<(n/2):
ans+=1
print(ans)


ans=0
for i in range(5):
a=str(input())
if a[0]==a[2] and int(a[3])-int(a[1])==1:
ans+=1
print(ans)


a=1
t=1
sum=1

n=int(input())
while True:
if sum>=n:
print(a)
break
t*=3
sum+=t
a+=1


n=int(input())
li=list(map(int,input().split()))
s=set()

for i in li:
for j in list(s):
print(len(s)-1)


def dfs(l,r,u):
if u==n:
return
dfs(l,r,u+1)

a=l+li[u]
w=abs(a-r)
dfs(a,r,u+1)

b=r+li[u]
w=abs(l-b)
dfs(l,b,u+1)

n=int(input())
li=list(map(int,input().split()))
s=set()
dfs(0,0,0)
print(len(s)-1)


time=int(input())
time//=1000
second=time%60
time//=60
minute=time%60
time//=60
hour=time%24
if second<10:
second='0'+str(second)
if minute<10:
minute='0'+str(minute)
if hour<10:
hour='0'+str(hour)
print(str(hour)+':'+str(minute)+':'+str(second))