from typing import List
from bisect import bisect_left, bisect_right


class Solution:

    def findContentChildren(self, G: List[int], S: List[int]) ->int:
        G.sort()
        S.sort()
        res = 0
        for s in S:
            index = bisect_right(G, s)
            if index > res:
                res += 1
        return res


g = [1, 2]
s = [1, 2, 3]
print(Solution().findContentChildren(g, s))

4026a679bb2da3b2043bb79de8e59977106c88a1
<mask token>


class Solution:
    <mask token>


<mask token>

<mask token>


class Solution:

    def findContentChildren(self, G: List[int], S: List[int]) ->int:
        G.sort()
        S.sort()
        res = 0
        for s in S:
            index = bisect_right(G, s)
            if index > res:
                res += 1
        return res


<mask token>
print(Solution().findContentChildren(g, s))

<mask token>


class Solution:

    def findContentChildren(self, G: List[int], S: List[int]) ->int:
        G.sort()
        S.sort()
        res = 0
        for s in S:
            index = bisect_right(G, s)
            if index > res:
                res += 1
        return res


g = [1, 2]
s = [1, 2, 3]
print(Solution().findContentChildren(g, s))

from typing import List
from bisect import bisect_left, bisect_right


class Solution:

    def findContentChildren(self, G: List[int], S: List[int]) ->int:
        G.sort()
        S.sort()
        res = 0
        for s in S:
            index = bisect_right(G, s)
            if index > res:
                res += 1
        return res


g = [1, 2]
s = [1, 2, 3]
print(Solution().findContentChildren(g, s))
