?? pku2610.cpp
字號(hào):
#include "stdio.h"
int main()
{
double x0,y0,x1,y1,dis1,dis2;
double holex,holey;
int flag;
scanf("%lf%lf%lf%lf",&x0,&y0,&x1,&y1);
flag=0;
while(scanf("%lf%lf",&holex,&holey)!=-1)
{
dis1=(x0-holex)*(x0-holex)+(y0-holey)*(y0-holey);
dis2=(x1-holex)*(x1-holex)+(y1-holey)*(y1-holey);
if(dis1*4<dis2&&flag==0)
{
printf("The gopher can escape through the hole at (%.3f,%.3f).\n",holex,holey);
flag=1;
}
}
if(flag==0)printf("The gopher cannot escape.\n");
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -