题目传送门

 /*
水题:读懂题目就能做
*/
#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的更多相关文章

  1. 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 ...

  2. 数学 Codeforces Round #308 (Div. 2) B. Vanya and Books

    题目传送门 /* 水题:求总数字个数,开long long竟然莫名其妙WA了几次,也没改啥又对了:) */ #include <cstdio> #include <iostream& ...

  3. 暴力/进制转换 Codeforces Round #308 (Div. 2) C. Vanya and Scales

    题目传送门 /* 题意:问是否能用质量为w^0,w^1,...,w^100的砝码各1个称出重量m,砝码放左边或在右边 暴力/进制转换:假设可以称出,用w进制表示,每一位是0,1,w-1.w-1表示砝码 ...

  4. 水题 Codeforces Round #302 (Div. 2) A Set of Strings

    题目传送门 /* 题意:一个字符串分割成k段,每段开头字母不相同 水题:记录每个字母出现的次数,每一次分割把首字母的次数降为0,最后一段直接全部输出 */ #include <cstdio> ...

  5. 水题 Codeforces Round #299 (Div. 2) A. Tavas and Nafas

    题目传送门 /* 很简单的水题,晚上累了,刷刷水题开心一下:) */ #include <bits/stdc++.h> using namespace std; ][] = {" ...

  6. 水题 Codeforces Round #304 (Div. 2) A. Soldier and Bananas

    题目传送门 /* 水题:ans = (1+2+3+...+n) * k - n,开long long */ #include <cstdio> #include <algorithm ...

  7. 水题 Codeforces Round #303 (Div. 2) A. Toy Cars

    题目传送门 /* 题意:5种情况对应对应第i或j辆车翻了没 水题:其实就看对角线的上半边就可以了,vis判断,可惜WA了一次 3: if both cars turned over during th ...

  8. 水题 Codeforces Round #286 (Div. 2) A Mr. Kitayuta's Gift

    题目传送门 /* 水题:vector容器实现插入操作,暴力进行判断是否为回文串 */ #include <cstdio> #include <iostream> #includ ...

  9. 构造水题 Codeforces Round #206 (Div. 2) A. Vasya and Digital Root

    题目传送门 /* 构造水题:对于0的多个位数的NO,对于位数太大的在后面补0,在9×k的范围内的平均的原则 */ #include <cstdio> #include <algori ...

随机推荐

  1. 【Todo】Java线程面试题 Top 50 (转载)

    原文链接:http://www.importnew.com/12773.html 这里有一个排版好看一点的:http://www.cnblogs.com/dolphin0520/p/3958019.h ...

  2. Angular2.x-显示heroes列表

    在此页面中,您将展开Tour of Heroes应用程序以显示heroes列表,并允许用户选择heroes并显示heroes的详细信息. 6.X 你需要一些heroes来展示. 最终你会从远程数据服务 ...

  3. awk基本使用方法简单介绍

    之前说过sed, 今天来说awk, 它也是一个文本处理器. 是linux下的一个命令, 比sed更强大. 搞linux开发, 尤其是后台开发, 这个命令差点儿必需要用到. awk这三个字母分别代表其三 ...

  4. soapUI系列之—-06 testrunner实现自动化测试

    TestRunner为soapUI自带------testrunner.bat/testrunner.sh 实现步骤: 1. 使用soapUI,针对接口文件创建测试用例. 2. 将测试用例保存至本地, ...

  5. C++ std::tr1::shared_ptr使用说明

    1. 介绍 shared_ptr 是通过指针保持某个对象的共享拥有权的智能指针. 若干个 shared_ptr 对象能够拥有同一个对象:最后一个指向该对象的 shared_ptr 被销毁或重置时.该对 ...

  6. 在 Ubuntu 开启 GO 程序编译之旅

    本文将使用 putty 连接到一台阿里云 Ubuntu 16.04 服务器,在其上安装 go 语言的编译环境,旨在呈现从安装到"你好,世界!"涉及的方方面面,希望完成这个过程无须觅 ...

  7. 【IOS】启动画面

    总述: 两种方式,一种是使用系统自带的.按规则定义启动图片名称就可以,显示为1秒,要想延长时间,用[nsthread ​ sleepForTimeInterval:5.0] ,还有一种就是自己定义ui ...

  8. 关于maven pom

    1 maven pom.xml只是配置文件 构建的流程已经固化在maven中了,pom.xml只是对这个流程的配置.特别是插件,在不进行人工绑定的情况下,插件是对应固定的生命周期的,我们操作的时候是操 ...

  9. Ant 打包 问题

    Ant 打包问题及解决归纳总结: 1.build.xml注意设置basedir: <project name="s2si"  default="dist" ...

  10. (6)servlet-创建一个servlet类

    1,在项目的src目录下,右键[New]-[Servlet] 2,在弹出窗口中填写信息 Package:所在包名 Name:servlet的类名 Which method stubs would yo ...