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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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 43 times
Sample Input/Output Input 5 00011 10001 00000 00100 01110 Output 60 Constraints 1 ≤ n ≤ 3000.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply