题目链接:http://poj.org/problem?id=1656

#include <stdio.h>
#include <iostream>
#include <string.h> using namespace std; int maps[][]; int main()
{
int t;
scanf("%d",&t);
memset(maps,,sizeof(maps)); while(t--)
{
char order[];
scanf("%s",order);
int x,y,l;
scanf("%d%d%d",&x,&y,&l); if(!strcmp(order,"BLACK"))
{
for(int i=x;i<=x+l-;i++)
{
for(int j=y;j<=y+l-;j++)
maps[i][j]=;
}
} if(!strcmp(order,"WHITE"))
{
for(int i=x;i<=x+l-;i++)
{
for(int j=y;j<=y+l-;j++)
maps[i][j]=;
}
} if(!strcmp(order,"TEST"))
{
int ans=;
for(int i=x;i<=x+l-;i++)
{
for(int j=y;j<=y+l-;j++)
if(maps[i][j]==)
ans++;
}
printf("%d\n",ans);
} }
return ;
}

最新文章

  1. C/C++内存泄漏及检测
  2. JAVA反射参数传递
  3. HDU 4283---You Are the One(区间DP)
  4. SSH免密码登录过程解析和实现
  5. eNSP的使用
  6. ios 解析html
  7. 弹出消息对话框ScriptManager
  8. Mybatis配置中遇到的问题和问题分析
  9. 浅谈“be practical and realistic”
  10. Jmeter初步使用三--使用jmeter自身录制脚本
  11. 标准简单SP模板(oracle)
  12. Storm博客收集
  13. C++面试经常涉及的概念1
  14. jquery实现图片上传前本地预览
  15. JVM堆外内存随笔
  16. .NET ORM框架 SqlSugar4.0 功能快速预览【开源】
  17. linux pwd命令 显示当前所在路径
  18. 10--Python入门--异常处理
  19. mod_conference ESL控制二(事件)
  20. UOJ33 [UR #2] 树上GCD 【点分治】【容斥原理】【分块】

热门文章

  1. Connection closing...Socket close. Connection closed by foreign host. Disconnected from remote host(centos6.9) at 14:59:05.
  2. java——删除链表中等于给定值的所有元素
  3. java——变量
  4. elasticsearch 插件 大全
  5. python-综合练习题(if条件语句,while循环,奇数偶数
  6. leetcode 196. Delete Duplicate Emails 配合查询的delete
  7. 性能测试工具LoadRunner25-LR之常用性能指标计算公式
  8. python的面向对象的特性(继承、封装、多态)
  9. mac os 和 ubuntu 上测试工具check-0.9.10的安装
  10. POJ 2594 —— Treasure Exploration——————【最小路径覆盖、可重点、floyd传递闭包】