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 ...
随机推荐
- 微信小程序toast框的使用
1.wx.showToast() 方法可以配置toast框的提示文字,消失的时间,显示的图标 wx.showToast({ title: '请链接网络', icon:"none", ...
- Promise.all函数的使用
Promise.all([this.getCity('guess'),this.getCity('hot'),this.getCity('group')]).then(res=>{ // con ...
- winSockets编程(二)socket函数
初始化DLL之后,接着创建套接字,通过socket()和WSASocket()函数实现此功能. SOCKET socket( int af, int type, int protocol ); af: ...
- Ng第十七课:大规模机器学习(Large Scale Machine Learning)
17.1 大型数据集的学习 17.2 随机梯度下降法 17.3 微型批量梯度下降 17.4 随机梯度下降收敛 17.5 在线学习 17.6 映射化简和数据并行 17.1 大型数据集的学习 ...
- Java应用分类
Java应用分类 一.应用程序.指在操作系统上直接运行的,不是浏览器,Java环境用本机的,需要在客户端安装,Java环境可以一起安装. 1.GUI图形界面应用程序 ...
- _编程语言_C++_std
正常使用 cout << "Count is "<<i<<endl; 含有std std::cout << "Count ...
- (最短路 弗洛伊德) Til the Cows Come Home -- POJ --2387
#include <iostream> #include <cstdlib> #include <cstring> #include <cstdio> ...
- MySQL连接查询(多表查询)
基本含义 连接就是指两个或两个以上的表(数据源) “连接起来成为一个数据源”. 连接语法的基本形式:from 表1 [连接方式] join 表2 [on 连接条件]; 连接的结果可以当做一个“表”来使 ...
- codeforces 925 c big secret
题意: 给你n个数,b[1],b[2],b[3].......,让你重新排列,使a[i]的值递增 a[i]和b的关系: a[i] = b[1]^b[2]^b[3]^....^b[i]; 首先说异或 ...
- ES基本操作
倒排索引 ElasticSearch使用一种称为倒排索引的结构,它适用于快速的全文搜索.一个倒排索引由文档中所有不重复词的列表构成,对于其中每个词,有一个包含它的文档列表. 查询 # 查看索引配置GE ...