This post is by a banned member (hashhags) - Unhide
12 November, 2024 - 06:41 AM
Reply
This post is by a banned member (gitgud21) - Unhide
12 November, 2024 - 10:14 AM
Reply
This post is by a banned member (akhill1) - Unhide
12 November, 2024 - 05:33 PM
Reply
(20 September, 2024 - 02:41 PM)Rosted5 Wrote: Show More
let's seeeee
This post is by a banned member (kanjijhf) - Unhide
15 November, 2024 - 02:07 PM
Reply
This post is by a banned member (cuminarid) - Unhide
17 November, 2024 - 12:43 PM
Reply
Code:
class Solution { public: bool isZeroArray(vector<int>& nums, vector<vector<int>>& queries) { int n=nums.size(); vector<int>freq(n+1,0); for(auto i:queries){ freq[i[0]]++; freq[i[1]+1]--; } int op=0; for(int i=0;i<n;i++){ op+=freq[i]; if(op<nums[i])return false; } return true; } };
This post is by a banned member (ponire) - Unhide
19 November, 2024 - 12:57 AM
Reply
This post is by a banned member (prudence846) - Unhide
20 November, 2024 - 04:52 PM
Reply
This post is by a banned member (sdfsefsdfsfc) - Unhide
24 November, 2024 - 06:04 PM
Reply