ural 1572 Yekaterinozavodsk Great Well
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#define maxn 1000
using namespace std; int main()
{
int f,n,t,f1;
double size,size1;
scanf("%d%lf",&f,&size);
scanf("%d",&n);
t=n;
int ans=;
while(t--)
{
scanf("%d%lf",&f1,&size1);
if(f==)
{
if(f1==)
{
if(size1<=size) ans++;
}
else if(f1==)
{
if(size*>=size1) ans++;
}
else if(f1==)
{
if(size*>=(sqrt(3.0)/2.0)*size1) ans++;
}
}
else if(f==)
{
if(f1==)
{
if(size*sqrt(2.0)>=size1*) ans++;
}
else if(f1==)
{
if(size*sqrt(2.0)>=size1) ans++;
}
else if(f1==)
{
if(size*sqrt(2.0)>=size1*(sqrt(3.0)/2.0)) ans++;
}
}
else if(f==)
{
if(f1==)
{
if(size>=*size1) ans++;
}
else if(f1==)
{
if(size>=size1) ans++;
}
else if(f1==)
{
if(size>=(sqrt(3.0)/2.0)*size1) ans++;
}
} }printf("%d\n",ans);
return ;
}
ural 1572 Yekaterinozavodsk Great Well的更多相关文章
- 后缀数组 POJ 3974 Palindrome && URAL 1297 Palindrome
题目链接 题意:求给定的字符串的最长回文子串 分析:做法是构造一个新的字符串是原字符串+反转后的原字符串(这样方便求两边回文的后缀的最长前缀),即newS = S + '$' + revS,枚举回文串 ...
- ural 2071. Juice Cocktails
2071. Juice Cocktails Time limit: 1.0 secondMemory limit: 64 MB Once n Denchiks come to the bar and ...
- ural 2073. Log Files
2073. Log Files Time limit: 1.0 secondMemory limit: 64 MB Nikolay has decided to become the best pro ...
- ural 2070. Interesting Numbers
2070. Interesting Numbers Time limit: 2.0 secondMemory limit: 64 MB Nikolay and Asya investigate int ...
- ural 2069. Hard Rock
2069. Hard Rock Time limit: 1.0 secondMemory limit: 64 MB Ilya is a frontman of the most famous rock ...
- ural 2068. Game of Nuts
2068. Game of Nuts Time limit: 1.0 secondMemory limit: 64 MB The war for Westeros is still in proces ...
- ural 2067. Friends and Berries
2067. Friends and Berries Time limit: 2.0 secondMemory limit: 64 MB There is a group of n children. ...
- ural 2066. Simple Expression
2066. Simple Expression Time limit: 1.0 secondMemory limit: 64 MB You probably know that Alex is a v ...
- ural 2065. Different Sums
2065. Different Sums Time limit: 1.0 secondMemory limit: 64 MB Alex is a very serious mathematician ...
随机推荐
- java笔记8之选择结构IF
注意1 A比较表达式无论简单还是复杂,结果必须是boolean类型 B:if语句控制的语句体如果是一条语句,大括号可以省略: 如果是多条语句,就不能省略.建议永远不要省 ...
- jquery width(), innerWidth(), outerWidth() 区别
#div1 { width: 100px; height: 100px; border: 5px black solid; padding: 10px; margin: 10px; backgroun ...
- SQL给查询结果加序号
情境:在用delphi7编程时,想要给查询出的结果一个编号,比方有一万条结果,就自己主动从1编号到10000 显示数据时用的是DBGrid控件,可是它的第一列无法非常好的显示编号,找了非常多方法都不能 ...
- Java Numeric Formatting--reference
I can think of numerous times when I have seen others write unnecessary Java code and I have written ...
- Java基础知识强化86:BigInteger类之BigInteger概述和构造方法
1. BigInteger类概述 可以让超过Integer范围内的数据进行运算 2. 构造方法: public BigInteger(String val) 3. 代码示例: package cn ...
- RHEL7查看网卡配置命令ip addr show
Validating Network Address Configuration To verify the configuration of the network address, you nee ...
- SQL读取系统时间的语法(转)
--获取当前日期(如:yyyymmdd) select CONVERT (nvarchar(12),GETDATE(),112) --获取当前日期(如:yyyymmdd hh:MM:ss)select ...
- HDU3756
题意:给定三围空间里面某些点,求构造出一个棱锥,将所有点包含,并且棱锥的体积最小. 输入: T(测试数据组数) n(给定点的个数) a,b,c(对应xyz坐标值) . . . 输出: H(构造棱锥的高 ...
- 基于脚本的动画的计时控制(“requestAnimationFrame”)(转)
requestAnimationFrame 方法的支持,该方法通过在系统准备好绘制动画帧时调用该帧,从而为创建动画网页提供了一种更平滑更高效的方法.在此 API 之前,使用 setTimeout 和 ...
- react-redux源码解析
有理解不对的地方,欢迎大家指正!!! react为什么需要redux辅助???react是view层的单向数据流框架,数据需要一层一层往子组件传递(子组件并不会自动继承).子组件需要操作父组件的数据时 ...