这道题真的很无聊,就是找一个圆,至少有一个点在这个圆上,其他点不能在圆外,半径不定;

 #include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#define maxn 3000
using namespace std; struct node
{
int x,y;
}p[];
double sqr(double x)
{
return x*x;
}
bool vis[maxn];
double dis(int x1,int y1,int x2,int y2)
{
return sqrt(sqr(x1-x2)+sqr(y1-y2));
}
int main()
{
int n;
scanf("%d",&n);
memset(vis,false,sizeof(vis));
for(int i=; i<n; i++)
{
scanf("%d%d",&p[i].x,&p[i].y);
vis[p[i].x]=true;
}
int x,y;
for(int i=; i<=maxn; i++)
{
if(!vis[i])
{
x=i;
y=;
break;
}
}
double max1=-;
for(int i=; i<n; i++)
{
max1=max(max1,dis(p[i].x,p[i].y,x,y));
}
printf("%d %d %.9lf\n",x,y,max1);
return ;
}

ural 1640 Circle of Winter的更多相关文章

  1. ural 2068. Game of Nuts

    2068. Game of Nuts Time limit: 1.0 secondMemory limit: 64 MB The war for Westeros is still in proces ...

  2. URAL 1936 Roshambo 题解

    http://acm.timus.ru/problem.aspx?space=1&num=1936 F - Roshambo Time Limit:1000MS Memory Limit:65 ...

  3. Ural 1079 - Maximum

    Consider the sequence of numbers ai, i = 0, 1, 2, …, which satisfies the following requirements: a0  ...

  4. bzoj 1814 Ural 1519 Formula 1 插头DP

    1814: Ural 1519 Formula 1 Time Limit: 1 Sec  Memory Limit: 64 MBSubmit: 942  Solved: 356[Submit][Sta ...

  5. Ural 1960 Palindromes and Super Abilities

    Palindromes and Super Abilities Time Limit: 1000ms Memory Limit: 65536KB This problem will be judged ...

  6. URAL 2092 Bolero 贪心

    C - Bolero Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submit S ...

  7. [翻译svg教程]svg中的circle元素

    svg中的<circle> 元素,是用来绘制圆形的,例如 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink= ...

  8. 设计一个程序,程序中有三个类,Triangle,Lader,Circle。

    //此程序写出三个类,triangle,lader,circle:其中triangle类具有类型为double的a,b,c边以及周长,面积属性, //具有周长,面积以及修改三边的功能,还有判断能否构成 ...

  9. c++作业:Circle

    Circle Github链接

随机推荐

  1. F - Warm up - hdu 4612(缩点+求树的直径)

    题意:有一个无向连通图,现在问添加一条边后最少还有几个桥 分析:先把图缩点,然后重构图为一棵树,求出来树的直径即可,不过注意会有重边,构树的时候注意一下 *********************** ...

  2. C - A Simple Problem with Integers - poj 3468(区间更新)

    题意:有一个比较长的区间可能是100000.长度, 每个点都有一个值(值还比较大),现在有一些操作,C abc, 把区间a-b内全部加上c, Qab,求区间ab的值. 分析:很明显我们不可能对区间的每 ...

  3. eclipse 错误: 找不到或无法加载主类

    在src文件夹上移除Source Folder,再点右键-Build Path-Use as Source Folder,重新进行编译,一切正常了.

  4. escape encodeURI encodeURIComponent区别

    escape() 函数可对字符串进行编码,这样就可以在所有的计算机上读取该字符串.使用unescape来解码. 有效的URI(统一资源标示符)是不能包含某些字符的,如空格,所以需要进行编码,编码方法有 ...

  5. AssertValid函数学习

    转自http://tsitao.blog.163.com/blog/static/29795822006914105840496/ VC的调试中,AssertValid和Dump函数的应用 CObje ...

  6. HDU 1166 敌兵布阵(线段树)

    题目地址:pid=1166">HDU 1166 听说胡浩版的线段树挺有名的. 于是就拜訪了一下他的博客.详情戳这里.于是就全然仿照着胡浩大牛的风格写的代码. 至于原理.鹏鹏学长已经讲的 ...

  7. 《C专家编程》第一天

    1.2 C语言的早期体验 1)C语言的基本数据类型直接与底层硬件相对应.C语言不存在内置的复数类型.C语言一开始不支持浮点类型,直到硬件系统能够直接支持浮点数之后才增加了对它的支持. 2)auto关键 ...

  8. js数组的操作及数组与字符串的相互转化

    数组与字符串的相互转化 <script type="text/javascript">var obj="new1abcdefg".replace(/ ...

  9. 手机端input,select屏蔽浏览器默认事件

    文本框input:当文本框focus时会弹出软键盘,有时我们需要click事件而又不想触发focus事件(不要弹出软键盘) 给input添加 disabled="disabled" ...

  10. ImageIO.wtrie生成jpg图片质量损失方案:BufferedImage生成jpg图片文件流

    Iterator<ImageWriter> iterator = ImageIO.getImageWritersByFormatName("jpeg"); ImageW ...