class Solution(object):
def findContentChildren(self, g, s):
"""
:type g: List[int]
:type s: List[int]
:rtype: int
"""
g.sort(reverse = True)
s.sort(reverse = True)
res = 0
gIndex = 0
sIndex = 0
while gIndex < len(g) and sIndex < len(s):
if s[sIndex] >= g[gIndex]:
res += 1
gIndex += 1
sIndex += 1
else:
gIndex += 1
return res
s = Solution()
g1 = [1,2,3]
s1 = [1,1]
print s.findContentChildren(g1,s1)