<prompt> Tekeleza darasa la SubrectangleQueries ambalo hupokea mstatili safu x koli kama mkusanyiko wa nambari kamili katika kijenzi na kutumia mbinu mbili:1. sasishaSubrectangleint row1, int col1, int row2, int col2, int newValue Husasisha thamani zote kwa Thamani mpya katika mstatili ambao uratibu wake wa juu kushoto ni safu1, col1 na uratibu wa chini kulia ni safu2, col2.2. getValueint row, int col Hurejesha thamani ya sasa ya kuratibu safu, safu kutoka kwa mstatili.Mfano wa 1:Ingizo SubrectangleQueries , getValue , updateSubrectangle , getValue , getValue , updateSubrectangle , getValue , getValue 1,2,1,4,3,4,3,2,1,1,1,1, 0,2,0,0,3,2,5,0,2,3,1,3,0,3,2,10 ,3,1,0,2Patonull,1,null,5,5,null,10,5UfafanuziSubrectangleQueries subrectangleQueries SubrectangleQueries mpya1,2,1,4,3,4,3,2,1,1,1,1 ; Mstatili wa mwanzo 4x3 unaonekana kama: 1 2 1 4 3 4 3 2 1 1 1 1subrectangleQueries.getValue0, 2; kurudi 1subrectangleQueries.updateMstatili0, 0, 3, 2, 5; Baada ya sasisho hili mstatili unaonekana kama: 5 5 5 5 5 5 5 5 5 5 5 5subrectangleQueries.getValue0, 2; kurudi 5subrectangleQueries.getValue3, 1; kurudi 5subrectangleQueries.updateMstatili3, 0, 3, 2, 10; Baada ya sasisho hili mstatili unaonekana kama: 5 5 5 5 5 5 5 5 5 10 10 10subrectangleQueries.getValue3, 1; kurudi 10subrectangleQueries.getValue0, 2; kurudi 5Mfano wa 2:Ingizo SubrectangleQueries , getValue , updateSubrectangle , getValue , getValue , updateSubrectangle , getValue 1,1,1,2,2,2,3,3,3,0,0, 0,0,2,2,100,0,0,2,2,1,1,2,2,20,2,2Patonull,1,null,100,100,null,20UfafanuziSubrectangleQueries subrectangleQueries new SubrectangleQueries1,1,1,2,2,2,3,3,3;subrectangleQueries.getValue0, 0; kurudi 1subrectangleQueries.updateMstatili0, 0, 2, 2, 100;subrectangleQueries.getValue0, 0; kurudi 100subrectangleQueries.getValue2, 2; kurudi 100subrectangleQueries.updateMstatili1, 1, 2, 2, 20;subrectangleQueries.getValue2, 2; kurudi 20Vikwazo: Kutakuwa na utendakazi usiozidi 500 ukizingatia mbinu zote mbili: updateSubrectangle na getValue. Safu mlalo 1, safu mlalo 100 safu rectangle.length cols mstatilii.urefu 0 safu1 safu2 safu 0 col1 col2 cols 1 Thamani mpya, mstatiliij 109 0 safu safu 0 col cols  <response>: def countNegativesgridi: m, n, hesabu, i, j lengridi, lengridi0, 0, 0, lengridi0 - 1 wakati mimi 0: ikiwa gridiij 0: hesabu j 1 mimi 1 kwingine: j - 1 hesabu ya kurudi 