HDU 3201 Build a Fence

水题

#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;

const double PI=3.1415926;

int main()
{
    double L;
    while(~scanf("%lf",&L)){
        if(!L) break;
        printf("%.2lf\n",(L*L)/(2*PI));
    }
    return 0;
}
时间: 2024-08-02 00:20:56

HDU 3201 Build a Fence的相关文章

HDU 6121 Build a tree(找规律+模拟)

Build a tree Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 946    Accepted Submission(s): 369 Problem Description HazelFan wants to build a rooted tree. The tree has n nodes labeled 0 to n−1

HDU 6121 Build a tree(完全K叉树)

http://acm.hdu.edu.cn/showproblem.php?pid=6121 题意:给你一颗完全K叉树,求出每棵子树的节点个数的异或和. 思路: 首先需要了解一些关于完全K叉树或满K叉树的一些知识: 对于每棵子树,只有三种情况: ①是满K叉树  ②不是满K叉树  ③叶子节点 并且非满K叉树最多只有一个,所以只需要将它进行特殊处理,具体看代码吧,说不清楚.代码参考了http://blog.csdn.net/my_sunshine26/article/details/77200282

HDU 6121 Build a tree —— 2017 Multi-University Training 7

HazelFan wants to build a rooted tree. The tree has nn nodes labeled 0 to n?1, and the father of the node labeled i is the node labeled  . HazelFan wonders the size of every subtree, and you just need to tell him the XOR value of these answers. Input

HDU 4667 Building Fence(求凸包的周长)

A - Building Fence Time Limit:1000MS     Memory Limit:65535KB     64bit IO Format:%I64d & %I64u Submit Status Description Long long ago, there is a famous farmer named John. He owns a big farm and many cows. There are two kinds of cows on his farm, o

Codeforce 270A - Fancy Fence (正多边形)

Emuskald needs a fence around his farm, but he is too lazy to build it himself. So he purchased a fence-building robot. He wants the fence to be a regular polygon. The robot builds the fence along a single path, but it can only make fence corners at

POJ 2018 Best Cow Fences

斜率优化DP...<浅谈数形结合思想在信息学竞赛中的应用 安徽省芜湖一中 周源>例题... Best Cow Fences Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 9311   Accepted: 2986 Description Farmer John's farm consists of a long row of N (1 <= N <= 100,000)fields. Each field c

poj 1873(枚举所有的状态+凸包)

The Fortified Forest Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 6115   Accepted: 1720 Description Once upon a time, in a faraway land, there lived a king. This king owned a small collection of rare and valuable trees, which had been

CodeCombat森林关卡Python代码

地牢关卡过完,接下来是边缘的森林! 1,森林保卫战 hero.moveUp() hero.buildXY("fence", 40, 52) hero.moveDown() hero.moveDown() hero.buildXY("fence", 40, 20) 2,羊肠小道 # It's the first point of the path. hero.moveXY(36, 59) # Move at the next points of the path. h

poj 1873 凸包+枚举

The Fortified Forest Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 6198   Accepted: 1744 Description Once upon a time, in a faraway land, there lived a king. This king owned a small collection of rare and valuable trees, which had been