⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 toj_2917.cpp

📁 Tianjin University Online Judge 的80多道题目 .
💻 CPP
字号:
/*B.   The WatchmanTime Limit: 1.0 Seconds   Memory Limit: 65536KTotal Runs: 67   Accepted Runs: 30The 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 of BA 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.InputYou 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.OutputYou 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 input1006532099Sample output14.1436.1464.79Problem Setter: Samina Azad (CSE - 03)Source:  CUET individual contest*/#include<cstdio>#include<cmath>int main(){  double tri;  while ( scanf( "%lf" , &tri ) != EOF )    {      printf( "%0.2lf\n" ,  sqrt(  2.0 * tri  ) );    }  return 0;}       

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -