TOJ 2917.The Watchman
来源:互联网 发布:win10网络连接受限制 编辑:程序博客网 时间:2024/04/29 01:22
题目链接:http://acm.tju.edu.cn/toj/showp2917.html
Time Limit: 1.0 Seconds Memory Limit: 65536K
Total Runs: 1120 Accepted Runs: 491
The military academy often employs some of their agents to keep their eyes on the susceptible areas. Suppose MN is the barracks for the soldiers and B, C are two blocks within it. The commander sent two soldiers from block B and C destined to the location A. The two soldiers were going to their destination on the direction ofBA and CA respectively. Both of them were inspecting the areas on their left and right. But when they were reached exactly on the halfway to their destination A, both of them were sent back to the barracks for an emergency need. So, both the soldiers returned to the pavilion on the shortest paths. They made an area of common observation EFPQ i.e. watched by both the soldiers. You have to calculate the side of the common observation area EFQP, if it can be recognized as a square.
Input
You are given the triangular area of AEF. You should keep it in mind that the common area EFQP will not be necessarily become a square always but you can treat this area as an equivalent of a square. E and F are the mid points of AB and AC respectively. Each input will be given in a single line. Input is terminated by a negative number.
Output
You have to calculate the side of the square that is equivalent to the area EFQP. The output should be correct to two decimal places.
Sample input
1006532099-1
Sample output
14.1436.1464.79
Problem Setter: Samina Azad (CSE - 03)
Source: CUET individual contest
水题,三角形中位线性质
#include <stdio.h>#include <cmath>int main(){double n;while(scanf("%lf",&n)&&n>=0)printf("%.2lf\n",(sqrt(n*2)));}
- TOJ 2917.The Watchman
- TOJ 1782.The jackpot
- TOJ 2429 Find the Clones
- Toj 3016 Decode the Strings
- TOJ 2034. Just the Facts
- TOJ 2076. The Drunk Jailer
- TOJ 2968. Find the Diagonal
- TOJ 1457. Beat the Spread!
- TOJ--2471: The Trip, 2007
- TOJ 4115 Find the number
- TOJ 1310.Do the Untwist
- TOJ 2838.The Eating Puzzle
- TOJ 3474.The Big Dance
- TOJ 4349: The Tallest in the Class
- Tian Ji -- The Horse Racing (TOJ 1188)
- TOJ 10002 The Tower of Hanoi
- TOJ 3517 The longest athletic track
- TOJ-2234. A+B In the Future
- Android开发中在一无所知的情况下打开别人的应用
- 解决 Error:Jack is required to support java 8 language features. Either enable Jack...
- 八.堆与堆的构建
- 简单代码数据赏析
- MongoDB二维坐标索引,GeoHash的运用原理
- TOJ 2917.The Watchman
- 利用proxychains在终端使用socks5代理
- Linux命令解析--tree
- JavaScript碰壁反弹效果
- ubuntu下px4飞控HITL仿真
- 封装PDO类
- 如何在CentOS 6.X 或 redhat 上安装JDK runtime environment (openjdk)
- 第3周项目1-顺序表的基本运算
- delphi 判断exe是否已经打开