编程介的小学生
2017-11-17 16:26Image Recognition
10Problem Description
Now there is an image recognition problem for you. Now you are given an image which is a N * N matrix and there are only 0s and 1s in the matrix. And we are interested in the squares in whose four edges there is no 0s. So it’s your task to find how many such squares in the image.
Input
The first line of the input contains an integer T (1<=T<=10) which means the number of test cases.
For each test cases, the first line is one integer N (1<=N<=1000) which is the size of the image. Then there are N lines and each line has N integers each of which is either 0 or 1.
Output
For each test case, please output a line which is "Case X: Y", X means the number of the test case and Y means the number of the squares we are interested in in the image.
Sample Input
1
3
1 1 0
1 1 0
0 0 0
Sample Output
Case 1: 5
- 点赞
- 回答
- 收藏
- 复制链接分享
1条回答
为你推荐
- 字符串无法转换为JSON数组[关闭]
- json
- java
- android
- php
- parsing
- 1个回答
- 尝试通过php将javascript表单数据保存到mysql数据库时“未定义的属性”
- javascript
- mysql
- php
- jquery
- 1个回答
- 找DAN,DDC,JAN,RTN,simNet,ResNet-50等模型的pytorch框架代码。能找几个是几个。
- 深度学习
- 人工智能
- 神经网络
- python
- 机器学习
- 3个回答
- 图像处理: 可口可乐罐识别算法的改进
- opencv
- algorithm
- image-processing
- c++
- 0个回答
- 网格布局中的投掷姿态检测
- android
- list
- gesture-recognition
- 0个回答