• + 0 comments

    def arrayManipulation(n, queries): arr=[0]*n for _ in queries: start=[0]-1 end=[1]-1 val=_[2] topVal=end+1 for i in range(start,topVal): arr[i]+=val return max(arr)

    m = input().split()

    n = int(nm[0])

    m = int(nm[1])

    queries = []

    for _ in range(m): queries.append(list(map(int, input().rstrip().split())))

    result=arrayManipulation(n, queries)