• API
• FAQ
• Tools
• Archive
SHARE
TWEET

# Untitled

a guest Dec 16th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. def fun1(x,y) :
2.         global obp
3.         obr=obp
4.         for i in range(nd):
5.                 for j in range(msd)
6. n=int(input())
7. m=int(input())
8. pd=[]
9. po=[]
10. obp=[]
11. d=[]
12. o=[]
13. pw=0
14. for i in range(60):
15.         obp.append([0]*60)
16. for i in range(n):
17.         spd=[]
18.         spd1=input()
19.         for c in spd1:
20.                 spd.append(c)
21.         pd.append(spd)
22. for i in range(n):
23.         spo=[]
24.         spo1=input()
25.         for c in spo1:
26.                 spo.append(c)
27.         po.append(spo)
28. for i in range(n):
29.         sd=[]
30.         for j in range(m):
31.                 if pd[i][j]=='H':
32.                         sd.append('H')
33.                 if po[i][j]=='W':
34.                         obp[i+20][j+20]='W'
35.         d.append(sd)
36.         if sd>msd:
37.                 msd=sd
38. d=d
39. nd=len(d)
40. for i in range(60):
41.         for j in range(60):
42.                 if obp[i][j]=='W' and (obp[i+1][j]!='W' or obp[i][j+1]!='W' or obp[i-1][j]!='W' or obp[i][j-1]!='W'):
43.                         pw=pw+1
44. while k<=pw:
45.         for i in range(60):
46.                 for j in range(60):
47.                         if obp[i][j]=='W' and  obp[i-1][j]!='W':
48.                                 fun1(i-1,j)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top