题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5742

AC代码:

/*
* 反思:
* 1.遇到简单题别激动,先把它所有的输入任务都完成了,在考虑处理的问题
* 2.当你的程序没有按回车就全部运行完的时候,这段程序十有八九是有问题的,
* 仔细检查是不是输入没输入全,或者特殊字符没处理或者运行过程中遇到问题了。
*/ #include <cstdio> using namespace std; int test;
int n, m, a, b;
int x, sum, cnt; int main() {
scanf("%d", &test);
while (test--) {
scanf("%d%d%d%d", &n, &m, &a, &b);
sum = n * m;
if (a > b) {
while (sum--) {
scanf("%d", &x);
}
printf("No Solution\n");
} else {
cnt = 0;
while (sum--) {
scanf("%d", &x);
if (x < a || x > b) {
cnt++;
}
}
printf("%d\n", cnt);
}
}
return 0;
}

[ZOJ 4014] Pretty Matrix的更多相关文章

  1. ZOJ 题目2859 Matrix Searching(二维RMQ)

    Matrix Searching Time Limit: 10 Seconds      Memory Limit: 32768 KB Given an n*n matrix A, whose ent ...

  2. ZOJ 1859 Matrix Searching(二维线段树)

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1859 Matrix Searching Time Limit: 10 Seco ...

  3. D - Matrix Multiplication ZOJ - 2316 规律题

    Let us consider undirected graph G = which has N vertices and M edges. Incidence matrix of this grap ...

  4. ACM解题之(ZOJ 1094) Matrix Chain Multiplication

    题目来源: 点击打开链接 题目翻译: 矩阵乘法问题是动态规划的典型例子. 假设你必须评估一个表达式,如A * B * C * D * E,其中A,B,C,D和E是矩阵.由于矩阵乘法是关联的,乘法运算的 ...

  5. ZOJ 2316 Matrix Multiplication

    Matrix Multiplication Time Limit: 2000ms Memory Limit: 32768KB This problem will be judged on ZJU. O ...

  6. ZOJ 3646 Matrix Transformer 二分匹配,思路,经典 难度:2

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4836 因为要使对角线所有元素都是U,所以需要保证每行都有一个不同的列上有U,设 ...

  7. zoj 2589 Matrix Searching 二维线段树

    题目链接 给一个n*n的矩阵, 给q个查询, 每次给出x1, y1, x2, y2, 求这个矩阵中的最小值. 代码基本上和上一题相同... #include<bits/stdc++.h> ...

  8. zoj 2316 Matrix Multiplication 解题报告

    题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2316 题目意思:有 N 个 点,M 条 边.需要构造一个N * ...

  9. ZOJ People Counting

    第十三届浙江省大学生程序设计竞赛 I 题, 一道模拟题. ZOJ  3944http://www.icpc.moe/onlinejudge/showProblem.do?problemCode=394 ...

随机推荐

  1. org.springframework.boot.web.server.WebServerException: Unable to create tempDir. java.io.tmpdir is set to C:\Users\ADMINI~1\AppData\Local\Temp\2\

    问题原因:springboot创建临时文件找不到对应的目录 解决办法:1. 重新指定临时文件位置  java -Djava.io.tempdir=D:/tmpdir -jar -my_project. ...

  2. MongoDB操作集

    官网 https://www.mongodb.com/download-center#community 基本资料: http://www.runoob.com/mongodb/mongodb-int ...

  3. JavaScript 弹出窗体

    //弹出层 //父页面代码.打开弹窗 function ProDBDisp(link) { var url = _spPageContextInfo.webAbsoluteUrl + link; va ...

  4. webservice学习教程(二)--理论

    一.WebService是什么? 1. 基于Web的服务:服务器端整出一些资源让客户端应用访问(获取数据) 2. 一个跨语言.跨平台的规范(抽象) 3. 多个跨平台.跨语言的应用间通信整合的方案(实际 ...

  5. python for循环的遍历

    a = "你好啊"for i in range(len(a)): print(i) 解释:"len()" 意思是长度,a中有三个字,所以len(a) = 3,把 ...

  6. PowerBI功能发布时间线

    DAX/PowerBI系列 - PowerBI功能发布时间线 PowerBI从GA/上线以来,每月发布的功能收集起来做成了一个报表:(耐心等待PowerBI 出来,噔噔噔噔~~~) 上图显示: 1)D ...

  7. JMeter-正则表达式(Json中取value的部分值)

    2019-04-26问题:返回的json中提取短信验证码614930 { : "total":2, : "totalPage":1, : "rows& ...

  8. Qt QComBox 文本框输入itemText && 文本框查找item && 本文框添加Item &&设置显示Item数量

    comBox的几种状态图如下:   图1:ui->comboBox->setEditable(true); 图2:ui->comboBox->setEditable(false ...

  9. CentOS 7 安装samba服务

    STEP 1. 安装 #安装 [root@study ~]yum install smaba [root@study ~]systemctl start smb nmb STEP 2. 建立共享目录以 ...

  10. Unityd外发光Shader Lab

    Shader "Faye/OutLightting" { Properties { _MainTex("Texture (RGB)", 2D) = " ...