Page 1 of 1

A-Long is an outstanding data science student. He is currently working on a data set that contains an n × n matrix. Each

Posted: Thu May 05, 2022 12:57 pm
by answerhappygod
A-Long is an outstanding data science student.
He is currently working on a data set that contains an n × n
matrix. Each entry of this matrix is either 0 or 1, and he wants to
find possible hidden patterns of this data set by counting the
number of sub-matrices that only contain 0.
Now he has finished his calculation and asked you to give him a
helping hand by double- checking his result. Write a program with
C++ to check the result.
Input:
The first line of the input contains an integer n, indicating the
size of the matrix.
Then it follows n 0/1 strings in the next n lines, denoting the
content of the matrix. Output
Output:
An integer in one line, indicating the total number of
sub-matrices without 1.
A Long Is An Outstanding Data Science Student He Is Currently Working On A Data Set That Contains An N N Matrix Each 1
A Long Is An Outstanding Data Science Student He Is Currently Working On A Data Set That Contains An N N Matrix Each 1 (31.03 KiB) Viewed 42 times
Sample Input/Output Input 5 00011 10001 00000 00100 01110 Output 60 Constraints 1 ≤ n ≤ 3000.