report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Biggest submatrix - MarisaOJ: Marisa Online Judge

Biggest submatrix

Time limit: 1000 ms
Memory limit: 256 MB
Given a binary matrix with $n$ rows and $m$ columns. Find the maximum area submatrix with at most $k$ number $1$. ### Input - The first line contains three integers $n, m,k$. - The next $n$ lines, each line contains a binary string of length $n$. ### Output - Print the area of the largest submatrix with at most $k$ number $1$. ### Constraints - $1 \le n, m \le 500$. - $1 \le k \le n \times m $. ### Example Input: ``` 3 3 2 100 100 001 ``` Output: ``` 6 ```
Introduction to two pointers
Merge array
Brewing potion 2
Unique elements
Small range
Number of pairs
Sum of three values
Brewing potion 3
Brewing potion 4
Three sequences
Biggest submatrix
Choosing numbers
Topic
Two pointers
Rating 1100
Solution (1) Solution