水题 Codeforces Round #308 (Div. 2) A. Vanya and Table
/*
水题:读懂题目就能做
*/
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <set>
using namespace std; const int MAXN = 1e2 + ;
const int INF = 0x3f3f3f3f;
int a[MAXN][MAXN]; int main(void) //Codeforces Round #308 (Div. 2) A. Vanya and Table
{
// freopen ("A.in", "r", stdin); int n;
while (scanf ("%d", &n) == )
{
memset (a, , sizeof (a));
int x1, y1, x2, y2;
while (n--)
{
scanf ("%d%d%d%d", &x1, &y1, &x2, &y2);
for (int i=y1; i<=y2; ++i)
{
for (int j=x1; j<=x2; ++j)
{
a[i][j]++;
}
}
}
int ans = ;
for (int i=; i<=; ++i)
{
for (int j=; j<=; ++j) ans += a[i][j];
} printf ("%d\n", ans);
} return ;
}
水题 Codeforces Round #308 (Div. 2) A. Vanya and Table的更多相关文章
- Codeforces Round #308 (Div. 2) A. Vanya and Table 暴力
A. Vanya and Table Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/552/pr ...
- 数学 Codeforces Round #308 (Div. 2) B. Vanya and Books
题目传送门 /* 水题:求总数字个数,开long long竟然莫名其妙WA了几次,也没改啥又对了:) */ #include <cstdio> #include <iostream& ...
- 暴力/进制转换 Codeforces Round #308 (Div. 2) C. Vanya and Scales
题目传送门 /* 题意:问是否能用质量为w^0,w^1,...,w^100的砝码各1个称出重量m,砝码放左边或在右边 暴力/进制转换:假设可以称出,用w进制表示,每一位是0,1,w-1.w-1表示砝码 ...
- 水题 Codeforces Round #302 (Div. 2) A Set of Strings
题目传送门 /* 题意:一个字符串分割成k段,每段开头字母不相同 水题:记录每个字母出现的次数,每一次分割把首字母的次数降为0,最后一段直接全部输出 */ #include <cstdio> ...
- 水题 Codeforces Round #299 (Div. 2) A. Tavas and Nafas
题目传送门 /* 很简单的水题,晚上累了,刷刷水题开心一下:) */ #include <bits/stdc++.h> using namespace std; ][] = {" ...
- 水题 Codeforces Round #304 (Div. 2) A. Soldier and Bananas
题目传送门 /* 水题:ans = (1+2+3+...+n) * k - n,开long long */ #include <cstdio> #include <algorithm ...
- 水题 Codeforces Round #303 (Div. 2) A. Toy Cars
题目传送门 /* 题意:5种情况对应对应第i或j辆车翻了没 水题:其实就看对角线的上半边就可以了,vis判断,可惜WA了一次 3: if both cars turned over during th ...
- 水题 Codeforces Round #286 (Div. 2) A Mr. Kitayuta's Gift
题目传送门 /* 水题:vector容器实现插入操作,暴力进行判断是否为回文串 */ #include <cstdio> #include <iostream> #includ ...
- 构造水题 Codeforces Round #206 (Div. 2) A. Vasya and Digital Root
题目传送门 /* 构造水题:对于0的多个位数的NO,对于位数太大的在后面补0,在9×k的范围内的平均的原则 */ #include <cstdio> #include <algori ...
随机推荐
- zedboard硬件连接过程
1. ZedBoard – Connect a 2nd micro-USBcable between the host machine and connector J17 (JTAG) 2. ...
- POJ 2545+2591+2247+1338简单水题
[题意简述]:就是有这种一个序列.就拿当p1 = 2,p2 = 3, p3 = 5,来举例.由这三个数为基准组成的序列是: 2,3,4,5,6,8,9,10,12--如今给你这个序列数组的下标,让你求 ...
- easyui使用心得
一.搭建easyui运行环境 1.下载easyui压缩文件 2.将降压后的文件添加至webapp目录下 3.引用5个必须的js和css文件 <!--引入easyui样式文件--> < ...
- Swift基础一(代码)
import Foundation println("Hello, World!") var string1 = "Hello BeiJing" //定义一个变 ...
- Android5.0(lollipop)新特性介绍(一)
今年6月的Google I/O大会上.Android L的初次见面我相信让会让非常多android粉丝有些小激动和小期待.当然作为开发人员的我来说,激动不言而喻,毕竟这是自08年以来改变最大的一个版本 ...
- 使用word模板生成pdf文件
使用word模板生成pdf文件 源码:UserWord
- Ctags基本配置
一般linux系统都会自带ctags,也可输入"ctags"看有木有该命令.有的话速度配置吧,没有话yum install ctags安装吧. 打开vim 配置文件,要是没该文件就 ...
- 深入分析JavaWeb Item13 -- jsp指令具体解释
一.JSP指令简单介绍 JSP指令(directive)是为JSP引擎而设计的.它们并不直接产生不论什么可见输出,而仅仅是告诉引擎怎样处理JSP页面中的其余部分. 在JSP 2.0规范中共定义了三个指 ...
- Deep Learning 27:Batch normalization理解——读论文“Batch normalization: Accelerating deep network training by reducing internal covariate shift ”——ICML 2015
这篇经典论文,甚至可以说是2015年最牛的一篇论文,早就有很多人解读,不需要自己着摸,但是看了论文原文Batch normalization: Accelerating deep network tr ...
- ORACLE 创建视图索引序列
/* 视图View 视图是从若干基本表和(或)其他视图构造出来的表 视图存放的都是查询语句,并没有真实的数据 虚表 作用 限制对数据的操作 复杂查询变简单 提供相同数据的不同显示 UNION ALL ...