#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的更多相关文章

  1. 后缀数组 POJ 3974 Palindrome && URAL 1297 Palindrome

    题目链接 题意:求给定的字符串的最长回文子串 分析:做法是构造一个新的字符串是原字符串+反转后的原字符串(这样方便求两边回文的后缀的最长前缀),即newS = S + '$' + revS,枚举回文串 ...

  2. ural 2071. Juice Cocktails

    2071. Juice Cocktails Time limit: 1.0 secondMemory limit: 64 MB Once n Denchiks come to the bar and ...

  3. ural 2073. Log Files

    2073. Log Files Time limit: 1.0 secondMemory limit: 64 MB Nikolay has decided to become the best pro ...

  4. ural 2070. Interesting Numbers

    2070. Interesting Numbers Time limit: 2.0 secondMemory limit: 64 MB Nikolay and Asya investigate int ...

  5. ural 2069. Hard Rock

    2069. Hard Rock Time limit: 1.0 secondMemory limit: 64 MB Ilya is a frontman of the most famous rock ...

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

  7. ural 2067. Friends and Berries

    2067. Friends and Berries Time limit: 2.0 secondMemory limit: 64 MB There is a group of n children. ...

  8. ural 2066. Simple Expression

    2066. Simple Expression Time limit: 1.0 secondMemory limit: 64 MB You probably know that Alex is a v ...

  9. ural 2065. Different Sums

    2065. Different Sums Time limit: 1.0 secondMemory limit: 64 MB Alex is a very serious mathematician ...

随机推荐

  1. POJ 2718 穷举

    题意:给定一组数字,如0, 1, 2, 4, 6, 7,用这些数字组成两个数,并使这两个数之差最小.求这个最小差.在这个例子上,就是204和176,差为28. 分析:首先可以想到,这两个数必定是用各一 ...

  2. I - Navigation Nightmare-poj 1984

    约翰和他的邻居生活在一个村庄里,他们的道路修建的很特别,都是正东正西或者正南正北,但是呢他们用一种方式描述他们和邻居的位置,比如说 6号 在1号 东面13处,那么我们就可以计算出来这两家的曼哈顿距离, ...

  3. XML的四种解析器原理及性能比较

    转自zsq 1.DOM     DOM 是用与平台和语言无关的方式表示 XML 文档的官方 W3C 标准.DOM 是以层次结构组织的节点或信息片断的集合.这个层次结构允许开发人员在树中寻找特定信息.分 ...

  4. mysql查询最近一小时的数据

    date_sub()函数: DATE_SUB(date,INTERVAL expr type) 实例: SELECT NOW(),DATE_SUB(NOW(),INTERVAL HOUR) as th ...

  5. javascript 如何避免属性访问错误

    var book = {subtitle: "Bible"}; var bookName = book.name.length // 这时候会出错,  因为试图查询这个不存在的对象 ...

  6. Android 布局 ViewGroup

    布局 res/layout 命名规则(全部小写) activity_ fragment_ item_ 基础组件 com.android.widget包下 父类View view:屏幕上一块矩阵区域 能 ...

  7. hdu5032 Always Cook Mushroom

    题意是这样,给定一个1000x1000的点阵.m组询问.每次询问一个由(0,0).(x,0)点一以及从原点出发的方向向量(a,b)构成的直角三角形包围的点的权值和. 点的权值是(x+A)(y+B),当 ...

  8. C#3.0 语言基础扩充

    隐含类型局部变量 var i = 5; var h = 13.4; var s = "C Sharp"; var intArr = new[] {1,2,3 }; var a = ...

  9. Java基础知识强化74:正则表达式之分割功能 (扩展练习)

    1. 看程序写结果:(面试题考过) package cn.itcast_03; /* * 分割功能练习 */ public class RegexDemo2 { public static void ...

  10. sql 常用语法汇总

    Sql常用语法 SQL分类: DDL—数据定义语言(CREATE,ALTER,DROP,DECLARE) DML—数据操纵语言(SELECT,DELETE,UPDATE,INSERT) DCL—数据控 ...