文件名称:LATTICE
-
所属分类:
- 标签属性:
- 上传时间:2016-10-05
-
文件大小:525byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
格子手绢
问题描述
久城送给维多利加一块苏格兰格子手绢,可是手绢不小心被咖啡弄脏了,久城不得不负
起清洗的责任。
手绢的格子可以用二维坐标系来描述,手绢左下角坐标为(0,0),右上角坐标为(N,M),
也就是说,手绢上一共有N*M个格子。咖啡在手绢上形成了一个圆形的污点,圆心位于整点(
X,Y)处,半径为R。久城想知道,有多少个格子被完全污染了,多少个格子被部分污染了。
这里,某个格子被“完全污染”的意思为该格内被污点覆盖面积=1,被“部分污染”的意
思为0<该格内被污点覆盖面积<1。
输入格式
一行5个整数N,M,X,Y,R。
输出格式
一行两个整数,由一个空格隔开,表示被完全污染的格子数量和被部分污染的格子数量
。
样例输入
2 2 0 0 2
样例输出
1 3
数据范围
对于20 的数据,N,M< 10;
对于60 的数据,N,M< 1000;
对于100 的数据,N,M< 1000000,0< X< N,0< Y< M,R< 1000000.-Plaid handkerchief
Problem descr iption
For a long time the city to Victoria and a piece of Scotland Plaid handkerchief, but the handkerchief was accidentally dirty coffee, for a long time the city had negative
Responsibility for cleaning.
The handkerchief lattice can be used to describe the two-dimensional coordinates of the lower left corner of the handkerchief, coordinates (0,0), the upper right corner coordinates (N, M),
That is to say, a handkerchief and a total of N*M lattice. Coffee has formed a circular spot in a handkerchief, a center at the whole point (
X, Y), the radius is R. For a long time the city wanted to know, how many squares were completely polluted, and how many checks were partly polluted.
Here, a square was completely pollution means the box is spot coverage area 1, is pollution .
The box is for 0 < < 1 spot covered area.
Input format
One line of 5 integers N, M, X, Y, R.
Output format
A line of two integers, separated by a space, that is co
问题描述
久城送给维多利加一块苏格兰格子手绢,可是手绢不小心被咖啡弄脏了,久城不得不负
起清洗的责任。
手绢的格子可以用二维坐标系来描述,手绢左下角坐标为(0,0),右上角坐标为(N,M),
也就是说,手绢上一共有N*M个格子。咖啡在手绢上形成了一个圆形的污点,圆心位于整点(
X,Y)处,半径为R。久城想知道,有多少个格子被完全污染了,多少个格子被部分污染了。
这里,某个格子被“完全污染”的意思为该格内被污点覆盖面积=1,被“部分污染”的意
思为0<该格内被污点覆盖面积<1。
输入格式
一行5个整数N,M,X,Y,R。
输出格式
一行两个整数,由一个空格隔开,表示被完全污染的格子数量和被部分污染的格子数量
。
样例输入
2 2 0 0 2
样例输出
1 3
数据范围
对于20 的数据,N,M< 10;
对于60 的数据,N,M< 1000;
对于100 的数据,N,M< 1000000,0< X< N,0< Y< M,R< 1000000.-Plaid handkerchief
Problem descr iption
For a long time the city to Victoria and a piece of Scotland Plaid handkerchief, but the handkerchief was accidentally dirty coffee, for a long time the city had negative
Responsibility for cleaning.
The handkerchief lattice can be used to describe the two-dimensional coordinates of the lower left corner of the handkerchief, coordinates (0,0), the upper right corner coordinates (N, M),
That is to say, a handkerchief and a total of N*M lattice. Coffee has formed a circular spot in a handkerchief, a center at the whole point (
X, Y), the radius is R. For a long time the city wanted to know, how many squares were completely polluted, and how many checks were partly polluted.
Here, a square was completely pollution means the box is spot coverage area 1, is pollution .
The box is for 0 < < 1 spot covered area.
Input format
One line of 5 integers N, M, X, Y, R.
Output format
A line of two integers, separated by a space, that is co
(系统自动生成,下载前可以参看下载内容)
下载文件列表
lattice.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.