def test_count():
    temp = SortedSet(range(100), load=7)
    assert all(temp.count(val) == 1 for val in range(100))
    assert temp.count(100) == 0
    assert temp.count(0) == 1
    temp.add(0)
    assert temp.count(0) == 1
    temp._check()
def test_count():
    temp = SortedSet(range(100), load=7)
    assert all(temp.count(val) == 1 for val in range(100))
    assert temp.count(100) == 0
    assert temp.count(0) == 1
    temp.add(0)
    assert temp.count(0) == 1
    temp._check()
Example #3
0
from sortedcontainers import SortedSet


def minimumBribes(q):
    a = SortedSet(1, 2, 3, 4, 5)


"""
if __name__ == '__main__':
    t = int(input())

    for t_itr in range(t):
        n = int(input())

        q = list(map(int, input().rstrip().split()))

        minimumBribes(q)
"""

a = SortedSet([1, 2, 3, 4, 5])

print(a.count(lambda x: x < 4))