uva 10310 - Dog and Gopher
来源:互联网 发布:影视模板源码交易网 编辑:程序博客网 时间:2024/06/06 14:03
#include <stdio.h>#include <string.h>#include <cmath>#include <iostream>using namespace std;struct point{double x, y;};int main(){ int n; point g, d, h[100000]; while(scanf("%d%lf%lf%lf%lf", &n, &g.x, &g.y, &d.x, &d.y)!=EOF) { for(int i = 0; i < n; i++) scanf("%lf%lf", &h[i].x, &h[i].y); int i, ok = 0; for(i = 0; i < n; i++) if((pow(d.x-h[i].x, 2) + pow(d.y-h[i].y, 2)) >= 4.0*(pow(g.x - h[i].x, 2) + pow(g.y - h[i].y, 2))) {ok=1;break;} if(ok) printf("The gopher can escape through the hole at (%.3lf,%.3lf).\n", h[i].x, h[i].y); else cout << "The gopher cannot escape." << endl; } return 0;}
- [uva] 10310 Dog and Gopher
- UVA 10310 - Dog and Gopher
- uva 10310 - Dog and Gopher
- UVa 10310 - Dog and Gopher
- UVa 10310 Dog and Gopher(long long)
- UVa 10310 Dog and Gopher(double)
- UVa Problem 10310 Dog and Gopher (狗拿地鼠)
- Dog and Gopher
- (挑战编程_13_1)Dog and Gopher
- UVa 10610 - Gopher and Hawks
- POJ 2610:Dog & Gopher
- ZOJ 1860:Dog & Gopher
- POJ 2610 Dog & Gopher G++
- ZOJ 1860|| Dog & Gopher(空行区分case
- POJ 2610 Dog & Gopher(水~)
- UVA 10080 Gopher 2
- UVa10610 - Gopher and Hawks(Dijkstra)
- UVA 11796 Dog Distance
- 重构方法简单列表
- HBase建表函数createTable的几点说明
- 关于全文搜索coreseek
- 关于耳机的补充
- Wireshark抓包工具使用教程以及常用抓包规则
- uva 10310 - Dog and Gopher
- mysql 编程
- heartbeat和Pacemaker配置
- centos x64系统下的boost编译和使用
- Linux操作系统下三种配置环境变量的方法(Linux查看环境变量当前信息和查看命令)
- 毕业了,我们都在成长
- Ant学习总结(1)对exec的理解
- i/o复用 select和poll用法
- javaPNS 基础篇