1. #include<iostream>
  2. #include<iomanip>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. //freopen("acm.acm","r",stdin);
  8. double x1;
  9. double y1;
  10. double x2;
  11. double y2;
  12. double hol_x;
  13. double hol_y;
  14. double len_gop;
  15. double len_dog;
  16. bool boo = false;
  17. cin>>x1>>y1>>x2>>y2;
  18. while(cin>>hol_x>>hol_y)
  19. {
  20. len_gop = (x1-hol_x)*(x1-hol_x) + (y1-hol_y)*(y1-hol_y);
  21. len_dog = (x2-hol_x)*(x2-hol_x) + (y2-hol_y)*(y2-hol_y);
  22. if(len_dog/4.000 > len_gop)
  23. {
  24. cout<<"The gopher can escape through the hole at ("<<setiosflags(ios::fixed)<<setprecision()<<hol_x<<","<<hol_y<<")."<<endl;
  25. boo = true;
  26. break;
  27. }
  28. }
  29. if(!boo)
  30. cout<<"The gopher cannot escape."<<endl;
  31. }

POJ 2610的更多相关文章

  1. POJ 2610:Dog & Gopher

    Dog & Gopher Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 4142   Accepted: 1747 ...

  2. [欧拉] poj 2230 Watchcow

    主题链接: http://poj.org/problem? id=2230 Watchcow Time Limit: 3000MS   Memory Limit: 65536K Total Submi ...

  3. POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理

    Halloween treats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7644   Accepted: 2798 ...

  4. POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理

    Find a multiple Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7192   Accepted: 3138   ...

  5. POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治

    The Pilots Brothers' refrigerator Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 22286 ...

  6. POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法

    Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 37427   Accepted: 16288 Descr ...

  7. POJ 3254. Corn Fields 状态压缩DP (入门级)

    Corn Fields Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9806   Accepted: 5185 Descr ...

  8. POJ 2739. Sum of Consecutive Prime Numbers

    Sum of Consecutive Prime Numbers Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 20050 ...

  9. POJ 2255. Tree Recovery

    Tree Recovery Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11939   Accepted: 7493 De ...

随机推荐

  1. 微信小程序toast框的使用

    1.wx.showToast() 方法可以配置toast框的提示文字,消失的时间,显示的图标 wx.showToast({ title: '请链接网络', icon:"none", ...

  2. Promise.all函数的使用

    Promise.all([this.getCity('guess'),this.getCity('hot'),this.getCity('group')]).then(res=>{ // con ...

  3. winSockets编程(二)socket函数

    初始化DLL之后,接着创建套接字,通过socket()和WSASocket()函数实现此功能. SOCKET socket( int af, int type, int protocol ); af: ...

  4. Ng第十七课:大规模机器学习(Large Scale Machine Learning)

    17.1  大型数据集的学习 17.2  随机梯度下降法 17.3  微型批量梯度下降 17.4  随机梯度下降收敛 17.5  在线学习 17.6  映射化简和数据并行 17.1  大型数据集的学习 ...

  5. Java应用分类

    Java应用分类     一.应用程序.指在操作系统上直接运行的,不是浏览器,Java环境用本机的,需要在客户端安装,Java环境可以一起安装.         1.GUI图形界面应用程序       ...

  6. _编程语言_C++_std

    正常使用 cout << "Count is "<<i<<endl; 含有std std::cout << "Count ...

  7. (最短路 弗洛伊德) Til the Cows Come Home -- POJ --2387

      #include <iostream> #include <cstdlib> #include <cstring> #include <cstdio> ...

  8. MySQL连接查询(多表查询)

    基本含义 连接就是指两个或两个以上的表(数据源) “连接起来成为一个数据源”. 连接语法的基本形式:from 表1 [连接方式] join 表2 [on 连接条件]; 连接的结果可以当做一个“表”来使 ...

  9. 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]; 首先说异或   ...

  10. ES基本操作

    倒排索引 ElasticSearch使用一种称为倒排索引的结构,它适用于快速的全文搜索.一个倒排索引由文档中所有不重复词的列表构成,对于其中每个词,有一个包含它的文档列表. 查询 # 查看索引配置GE ...