• POJ 2610


     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(3)<<hol_x<<","<<hol_y<<")."<<endl;
    25             boo = true;
    26             break;
    27         }
    28     }
    29     if(!boo)
    30         cout<<"The gopher cannot escape."<<endl;
    31 }
  • 相关阅读:
    404、500、502等HTTP状态码介绍
    Linux系统信息查看命令
    SVN clean up 无法继续
    gitlab使用
    Git SSH Key 生成步骤
    gitlab 杂记
    JS函数
    MySQL基础
    WEB测试方法
    操作系统的发展史
  • 原文地址:https://www.cnblogs.com/gavinsp/p/4568621.html
Copyright © 2020-2023  润新知