zoj1716 Get Many Persimmon Trees
来源:互联网 发布:推荐一款模拟钢琴软件 编辑:程序博客网 时间:2024/05/16 05:05
//2613762 2011-08-03 16:55:55 Accepted 1716 C++ 10 188 ylwh!#include <stdio.h>#include <string.h>#define MAX 101using namespace std;int w, h, n, s, t;bool map[MAX][MAX];void input(){int i, x, y;scanf("%d%d", &w, &h);for(i=0; i<n; i++){scanf("%d%d", &x, &y);map[x][y] = true;}scanf("%d%d", &s, &t);}int search(int x, int y){int i, j, count=0;for(i=x; i<x+s; i++)for(j=y; j<y+t; j++)if(map[i][j] == true)count++;return count;}int main(){int i, j, maxn, temp;while(scanf("%d", &n) , n){memset(map, false, sizeof(map));input();maxn = 0;for(i=1; i<=w-s+1; i++)for(j=1; j<=h-t+1; j++){temp = search(i, j);if(temp > maxn)maxn = temp;}printf("%d\n", maxn);}return 0;}
- zoj1716 Get Many Persimmon Trees
- zoj1716 Get Many Persimmon Trees
- pku2029 Get Many Persimmon Trees
- poj2029 Get Many Persimmon Trees
- POJ2029--Get Many Persimmon Trees
- poj2029 Get Many Persimmon Trees
- poj2029 Get Many Persimmon Trees
- POJ2029 Get Many Persimmon Trees
- poj2029 Get Many Persimmon Trees
- POJ 2029 Get Many Persimmon Trees
- Poj 2029 Get Many Persimmon Trees
- POJ 2029 Get Many Persimmon Trees [dp]
- zoj 1716 Get Many Persimmon Trees
- POJ 2029 Get Many Persimmon Trees (标记)
- POJ 2029 Get Many Persimmon Trees
- ZOJ 1716 Get Many Persimmon Trees (暴力)
- poj-2029-Get Many Persimmon Trees-预处理
- POJ 2029 Get Many Persimmon Trees
- Struts2乱码终极解决办法
- linux下打开16进制文件
- HDU 1754 I Hate It .
- crontab
- The Ruby Programming Language【chapter 1读书摘要】
- zoj1716 Get Many Persimmon Trees
- as3xls导入导出Excel
- Objective-C 开发的一点小总结(持续更新)
- typedef 数组 详解一目了然
- C++ 标准库
- c/c++程序之_KMP字符串模式匹配详解
- MySQL源代码安装
- 将android launcher2导入eclipse中运行
- WebService相关