You are given an integer n representing a street with positions numbered from n
You are also given a 2D integer array lights, where lights[i]
Additionally, you are given a 0-indexed integer array requirement of length n, where requirement[i] represents the minimum brightness required at position i. The brightness of position i is defined as the total number of street lamps that illuminate it.
Return the total number of positions i for which the brightness at position i is at least requirement[i].
Constraints:
n
lights.length
n
requirement.length n
requirement[i]
You are given an integer n representing a street with positions numbered from n
You are also given a 2D integer array lights, where lights[i]
Additionally, you are given a 0-indexed integer array requirement of length n, where requirement[i] represents the minimum brightness required at position i. The brightness of position i is defined as the total number of street lamps that illuminate it.
Return the total number of positions i for which the brightness at position i is at least requirement[i].
Constraints:
n
lights.length
n
requirement.length n
requirement[i]