#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. 利用"NOTIFYICONDATA"实现MFC的托盘程序

    本文章为转发百度空间内容,,保存一下,以防以后用到.. 一.自定义信息 在头文件中加入下面这句话: #define WM_SHOWTASK (WM_USER+1) 二.MYDLG.CPP文件中添加_m ...

  2. Hu矩SVM训练及检测-----OpenCV

    关键词:Hu矩,SVM,OpenCV 在图像中进行目标物识别,涉及到特定区域内是否存在目标物,SVM可在样本量较少情况下对正负样本(图片中前景背景)做出良好区分,图片基本特征包括诸如HOG.LBP.H ...

  3. 微软下一代云环境Web开发框架ASP.NET vNext预览

    微软在2014年5月12日的TechEd大会上宣布将会公布下一代ASP.NET框架ASP.NET vNext的预览.此次公布的ASP.NET框架与曾经相比发生了根本性的变化,凸显了微软"云优 ...

  4. Android Spinner列表选择框

    Spinner Spinner是一个下拉列表,通常用于选择一系列可选择的列表项,它可以使用适配器,也可以直接设置数组源. 1.直接设置数组源 在res/values/strings.xml中设置数组源 ...

  5. [Javascript] JavaScript Array Methods in Depth - push

    Array push is used to add elements to the end of an Array. In this lesson we'll see how the push met ...

  6. 安装apache重启的时候,报错端口被占用,错误1

    在cmd中执行以下命令来重新分配. netsh winsock reset. 还不行的话可以重启电脑,再不行就算apache配置文件错误.

  7. CCDictionary&CCArray执行retain()重要点

    CCDictionary也需要执行retain(),否则则跟CCArray,返回则释放对象. 在Lua中,忘记了retain(),导致一些出现gCCDictionary:objectForKey(ke ...

  8. Two-Phase-Commit for Distributed In-Memory Caches--reference

    Part I reference from:http://gridgain.blogspot.kr/2014/09/two-phase-commit-for-distributed-in.html 2 ...

  9. 第四章:使用Proxy代理让客户端服务端分工合作。

    <基于1.8 Forge的Minecraft mod制作经验分享> 别被那个Proxy代理吓到,很简单的. 我们先讨论为什么要用Proxy代理: 像打开新的UI这种操作,比如打开一个背包, ...

  10. JAVA try-catch-finally-return

      正常执行流程: try执行,遇到异常就跳到catch执行(以使得程序不会崩溃): 不管有没有异常catch,最后都执行finally   含return语句执行流程分析: 若try块中return ...