POJ 2610
#include<iostream>
#include<iomanip>
using namespace std; int main()
{
//freopen("acm.acm","r",stdin);
double x1;
double y1;
double x2;
double y2;
double hol_x;
double hol_y;
double len_gop;
double len_dog;
bool boo = false;
cin>>x1>>y1>>x2>>y2;
while(cin>>hol_x>>hol_y)
{
len_gop = (x1-hol_x)*(x1-hol_x) + (y1-hol_y)*(y1-hol_y);
len_dog = (x2-hol_x)*(x2-hol_x) + (y2-hol_y)*(y2-hol_y);
if(len_dog/4.000 > len_gop)
{
cout<<"The gopher can escape through the hole at ("<<setiosflags(ios::fixed)<<setprecision()<<hol_x<<","<<hol_y<<")."<<endl;
boo = true;
break;
}
}
if(!boo)
cout<<"The gopher cannot escape."<<endl;
}
POJ 2610的更多相关文章
- POJ 2610:Dog & Gopher
Dog & Gopher Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4142 Accepted: 1747 ...
- [欧拉] poj 2230 Watchcow
主题链接: http://poj.org/problem? id=2230 Watchcow Time Limit: 3000MS Memory Limit: 65536K Total Submi ...
- POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理
Halloween treats Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7644 Accepted: 2798 ...
- POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理
Find a multiple Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7192 Accepted: 3138 ...
- POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治
The Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22286 ...
- POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 37427 Accepted: 16288 Descr ...
- POJ 3254. Corn Fields 状态压缩DP (入门级)
Corn Fields Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 9806 Accepted: 5185 Descr ...
- POJ 2739. Sum of Consecutive Prime Numbers
Sum of Consecutive Prime Numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20050 ...
- POJ 2255. Tree Recovery
Tree Recovery Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11939 Accepted: 7493 De ...
随机推荐
- 2018.11.02 洛谷P2661 信息传递(拓扑排序+搜索)
传送门 按照题意模拟就行了. 先拓扑排序去掉不在环上面的点. 剩下的都是简单环了. 于是都dfsdfsdfs一遍求出最短的环就行. 代码: #include<bits/stdc++.h> ...
- idea下启动tomcat时,打印的日志中文乱码
idea2018.2+tomcat8+java8+win10 异常:将编码方式全都修改为UTF-8后,且tomcat的VM启动参数中配置了:-Dfile.encoding=UTF-8.导致控制台日志打 ...
- exec函数
概念 当进程调用一种exec函数时,该进程执行的程序完全替换为新程序,新程序从main函数开始执行.调用exec并不创建新进程,所以前后的进程ID并未改变.exec只是用磁盘上的一个新程序替换了当前进 ...
- adb 调试出现问题
用adb shell时出现error: insufficient permissions for device 在终端输入 sudo -s adb kill-server adb start-serv ...
- java中的标识符、关键字、保留字
Java中关键字(keyword)和保留字(reservedword) Keyword :Java的关键字对java的编译器有特殊的意义,他们用来表示一种数据类型,或者表示程序的结构等. Reserv ...
- 1045 Favorite Color Stripe 动态规划
1045 Favorite Color Stripe 1045. Favorite Color Stripe (30)Eva is trying to make her own color strip ...
- HTML5表单新属性
HTML5表单新属性 autofocus 自动聚焦 <input type="text" autofocus> placeholder占位文本 tel ...
- POJ3176--Cow Bowling(动态规划)
The cows don't use actual bowling balls when they go bowling. They each take a number (in the range ...
- secureCRT端口转发功能突破防火墙限制
这样一个场景:A是办公网络的一台windows主机,B是一台Linux堡垒机,C是生产环境一台Oracle主机, A只能访问B但A不能访问C,B可以访问到C,那怎样才可以使A机上的“ PLSQL De ...
- windows安装mysql 5.7
1.下载mysql 5.7 压缩包,解压在D:\software\mysql\目录下,更名称mysql-5.7.22 ,并新建data空文件夹和my.ini文件 my.ini文件的内容 [client ...