You are viewing a single comment's thread. Return to all comments →
n, m = input().strip().split(' ') n, m = [int(n), int(m)] l = [0] * (n+1) for a0 in range(m): a, b, k = input().strip().split(' ') a, b, k = [int(a), int(b), int(k)] l[a:b+1] = list(map(lambda x:x+k,l[a:b+1])) print(max(l))
The above code is showing runtime error for test case 7 onwards. please suggest the reason?
Seems like cookies are disabled on this browser, please enable them to open this website
Array Manipulation
You are viewing a single comment's thread. Return to all comments →
The above code is showing runtime error for test case 7 onwards. please suggest the reason?