Math and Query

Правка en1, от Tboros_kylie, 2024-08-22 06:31:25

I have two problems

(1): You are given a m x n grid , with each a[i][j] = 0 or 1 , counting sum of rectangles made from 1 (m*n <= 1e6) Ex:

3 2

1 0 1 1 1 0

Ans: 8

(2): We are given n paragraph , call [l;r] , and q queries paragraph call [u;v] , each queries , we need to count how many [l;r] satisfied this condition: u <= l <= r <= v

(l,r,u,v <= 1e5)

Теги math, data structures

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Tboros_kylie 2024-08-22 06:31:25 391 Initial revision (published)