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 ...
随机推荐
- windows快捷键和命令
以管理员方式打开命令行界面:win+X+A 打开服务界面:services.msc 删掉windows系统记住的WIFI密码 cmd下面运行 显示存储的无线连接netsh wlan show prof ...
- linux性能分析命令和性能观察工具
- Maven assembly插件输出文件乱码问题
使用Maven的<artifactId>maven-assembly-plugin</artifactId>插件导致输出的XML配置文件源文件的中文注释变成乱码,排查了多个地方 ...
- floor() 和 ceil()函数
在C语言的库函数中,floor函数的语法例如以下: #include <math.h> double floor( double arg ); 功能: 函数返回參数不大于arg的最大整数. ...
- [Redux] Implementing Store from Scratch
Learn how to build a reasonable approximation of the Redux Store in 20 lines. No magic! const counte ...
- Java基础知识强化76:正则表达式之替换功能
1. 替换功能: String类的replaceAll方法,如下: public String replaceAll(String regex, String replacement): 使用给定的r ...
- Ambari安装
给hadoop用户sudo权限 hadoop ALL=(ALL) NOPASSWD:ALL 建立SSH互信,参考Hadoop HA的搭建中的互信建立 建立相应的下载脚本down.sh nohup wg ...
- 从JPG中获取缩略图
using System; using System.Drawing; using System.Collections; using System.ComponentModel; using Sys ...
- JQuery简单实现图片轮播效果
很多页面都需要用到界面轮播,但是用原生js相对来说比较复杂,用jQuery实现效果比较迅速,写个简单的demo 1.首先在HTML页面要放置轮播图案位置插入div,这里写了轮播图片数量为3张,所以定义 ...
- WordPress程序流程分析
index.php 统一入口文件 包含wp-blog-heaer.php 包含wp-load.php 包含wp-config.php 数据库.语言包配置等 包含wp-setting.php 对各种运行 ...