[GESP202503 四级] 二阶矩阵
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目背景
2025 年 03 月 GESP C++ 四级编程第 2 题
题目描述
小 A 有一个 行 列的矩阵 。
小 A 认为一个 的矩阵 是好的,当且仅当 。其中 表示矩阵 的第 行第 列的元素。
小 A 想知道 中有多少个好的子矩阵。
输入格式
第一行,两个正整数 。
接下来 行,每行 个整数 。
输出格式
一行,一个整数,表示 中好的子矩阵的数量。
样例
3 4
1 2 1 0
2 4 2 1
0 3 3 0
2
样例解释
样例中好的子矩阵如下:
数据范围
对于所有测试点,保证 ,,
GESP四级编程题练习
- Status
- Done
- Problem
- 13
- Open Since
- 2025-5-10 17:00
- Deadline
- 2025-6-30 23:59
- Extension
- 24 hour(s)