题目:http://acm.fzu.edu.cn/problem.php?pid=2140

题意:

题目大意:给出n,要求找出n个点,满足: 
1)任意两点间的距离不超过1; 
2)每个点与(0,0)点的距离不超过1; 
3)有n对点之间的距离刚好为1; 
4)n个点组成的多边形面积大于0.5; 
5)n个点组成的多边形面积小于0.75;

思路:只要有4个点以上就是,构造时先找出四个点,再在半径为1的圆上找点就行。

很巧妙的一道题目呀、、、、

 #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <algorithm>
using namespace std; double x[], y[];
void slo()
{
x[] = ; y[] = ;
x[] = ; y[] = ;
x[] = 0.5; y[] = sqrt(-0.5*0.5);
x[] = 0.5; y[] = y[]-;
for(int i = ; i < ; i++)
{
x[i] = -0.001*i;
y[i] = sqrt(-x[i]*x[i]);
}
}
int main()
{
int t, n;
cin>>t;
slo();
while(t--)
{
cin>>n;
if(n<=)
cout<<"No"<<endl;
else
{
cout<<"Yes"<<endl;
for(int i = ; i < n; i++)
printf("%.6lf %.6lf\n", x[i], y[i]);
}
}
return ;
}

fzu Problem 2140 Forever 0.5(推理构造)的更多相关文章

  1. FZU 2140 Forever 0.5 (几何构造)

    Forever 0.5 Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit  ...

  2. FZU 2140 Forever 0.5

     Problem 2140 Forever 0.5 Accept: 36    Submit: 113    Special JudgeTime Limit: 1000 mSec    Memory ...

  3. FZU 2140 Forever 0.5(找规律,几何)

    Problem 2140 Forever 0.5 Accept: 371 Submit: 1307 Special Judge Time Limit: 1000 mSec Memory Limit : ...

  4. ACM学习历程—FZU 2140 Forever 0.5(计算几何 && 构造)

    Description   Given an integer N, your task is to judge whether there exist N points in the plane su ...

  5. FZU 2140 Forever 0.5(将圆离散化)

    主要就是将圆离散化,剩下的都好办 #include<iostream> #include<cstdio> #include<cstring> #include< ...

  6. 翻翻棋(找规律问题)(FZU Problem 2230)

    题目是这样的: FZU Problem 2230 象棋翻翻棋(暗棋)中双方在4*8的格子中交战,有时候最后会只剩下帅和将.根据暗棋的规则,棋子只能上下左右移动,且相同的级别下,主动移动到地方棋子方将吃 ...

  7. FZu Problem 2233 ~APTX4869 (并查集 + sort)

    题目链接: FZu Problem 2233 ~APTX4869 题目描述: 给一个n*n的矩阵,(i, j)表示第 i 种材料 和 第 j 种材料的影响值,这个矩阵代表这n个物品之间的影响值.当把这 ...

  8. FZu Problem 2236 第十四个目标 (线段树 + dp)

    题目链接: FZu  Problem 2236 第十四个目标 题目描述: 给出一个n个数的序列,问这个序列内严格递增序列有多少个?不要求连续 解题思路: 又遇到了用线段树来优化dp的题目,线段树节点里 ...

  9. fzu Problem - 2232 炉石传说(二分匹配)

    题目链接:http://acm.fzu.edu.cn/problem.php?pid=2232 Description GG学长虽然并不打炉石传说,但是由于题面需要他便学会了打炉石传说.但是传统的炉石 ...

随机推荐

  1. net windows Kafka

    net windows Kafka 安装与使用入门(入门笔记) 完整解决方案请参考: Setting Up and Running Apache Kafka on Windows OS   在环境搭建 ...

  2. GDAL编译(转)

    一.简单的编译 1.使用VisualStudio IDE编译 首先进入GDAL的源代码目录,可以看到有几个sln为后缀的文件名,比如makegdal10.sln,makegdal80.sln,make ...

  3. openstack安装、卸载与启动

    一.安装: 更新: sudo apt-get update sudo apt-get upgrade 安装图形化界面: sudo apt-get install ubuntu-desktop 安装gc ...

  4. Java 集合类(一)

    今天我们先讲一下Collection: Collection和Collections的区别: java.util.Collection是一种java集合接口,它提供了对集合对象的基本操作通用接口方法, ...

  5. HTML弹出窗口

    1.最简单的 <script type="text/javascript"> <!-- window.open("http://cn.bing.com& ...

  6. Basic Concepts of International Trade

    The international trade structure is a reflection of worldwide economic development, industrial stru ...

  7. tomcat 优化实记

    好记性不如烂笔头,以下是 tomcat 无脑优化 1.内存设置(VM参数调优)(1). Windows环境下,是tomcat解压版(执行startup.bat启动tomcat)  解决办法:修改“%T ...

  8. Codeforces Round #362 (Div. 2)->A. Pineapple Incident

    A. Pineapple Incident time limit per test 1 second memory limit per test 256 megabytes input standar ...

  9. 已收录的帝国cms文章被误删除了怎么办?

    我们一直提倡网站要经常备份,但是有时也会遗忘,一不小心被谁删除了那就欲哭无泪了.就像ytkah刚弄了一个站,开了个权限比较高的后台帐号给别人用,居然把两三个栏目都删除了,想发狂啊.刚好又有段时间没备份 ...

  10. APT工作原理

    两篇好的文章:http://blog.csdn.net/newjueqi/article/details/6679857 http://blog.csdn.net/buguyiqie/article/ ...