#P2733. [USACO3.3] 家的范围 Home on the Range
[USACO3.3] 家的范围 Home on the Range
Description
{{FJ needs to count how many square pastures can be grazed (at least in size, and no cell in this shape is damaged; in other words, all cells are "1"). Your task is to count, in the given data, how many grazeable square pastures of size at least there are. Of course, grazing regions may overlap.}}
Input Format
{{Line 1: , the side length of the pasture. Lines 2 to : characters with no spaces. indicates that cell is damaged; indicates intact land.}}
Output Format
{{Output the side length and the count of such squares that exist, one size per line, in increasing order of side length.}}
6
101111
001111
111111
001111
101101
111001
2 10
3 4
4 1
Hint
{{Translation from NOCOW. USACO Training Section 3.3.}}
Translated by ChatGPT 5
京公网安备 11011102002149号