Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*-----------------------------------------*/
- //Author : Mir Riyanul Islam (Riyan)
- //University : AIUB
- //E-mail : [email protected]
- //Problem ID : 10310
- //Problem Name: Dog and Gopher
- //Algorithm : Geometry
- /*-----------------------------------------*/
- #pragma warning (disable : 4786)
- #pragma comment(linker, "/STACK:16777216")
- #include <set>
- #include <map>
- #include <list>
- #include <cmath>
- #include <ctime>
- #include <deque>
- #include <queue>
- #include <stack>
- #include <cctype>
- #include <cstdio>
- #include <string>
- #include <vector>
- #include <cassert>
- #include <cstdlib>
- #include <cstring>
- #include <sstream>
- #include <iostream>
- #include <algorithm>
- using namespace std;
- const double EPS = 1e-11;
- const int INF = ( 1<<29 );
- const double PI = 2 * acos( 0.0 );
- int MAX( int a , int b ) { return a > b ? a : b; }
- int MIN( int a , int b ) { return a < b ? a : b; }
- void SWAP( int &a , int &b ) { int t = a; a = b; b = t; }
- int GCD( int a , int b ) { while( b ) { b ^= a ^= b ^= a %= b; } return a; }
- int main() {
- freopen( "input.txt" , "r" , stdin );
- freopen( "output.txt" , "w" , stdout );
- int tc , cn = 0;
- double r;
- scanf( "%d" , &tc );
- while( tc-- ) {
- scanf( "%lf" , &r );
- printf( "Case %d: %.2lf\n" , ++cn , ( r * r ) * ( PI - ( sqrt( 3.0 ) / 2.0 ) ) );
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment