Please read the new rule regarding the restriction on the use of AI tools. ×

zeref_dragoneel's blog

By zeref_dragoneel, history, 8 years ago, In English

How to count the number of rectanglular submatrix with all 1s in a binary square matrix of size N in O(N^2)?

i have a solution for o(N^3)

  • Vote: I like it
  • +2
  • Vote: I do not like it

| Write comment?
»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Nice question! Like you, i am only solving the O(N^3) algorithm with two pointer technique, and i guess O(N^2 Log N) with divide and conquer maybe..

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Test your idea with this problem from COCI. My O(N^2 Log N) idea get TLE.