結果

問題 No.1319 最強とんがりコーン
ユーザー tko919tko919
提出日時 2020-12-16 01:50:33
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 858 bytes
コンパイル時間 1,740 ms
コンパイル使用メモリ 166,064 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-20 08:45:17
合計ジャッジ時間 3,434 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
4,372 KB
testcase_02 AC 2 ms
4,372 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 2 ms
4,372 KB
testcase_06 AC 2 ms
4,372 KB
testcase_07 AC 2 ms
4,372 KB
testcase_08 AC 2 ms
4,372 KB
testcase_09 AC 2 ms
4,372 KB
testcase_10 AC 2 ms
4,372 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 2 ms
4,372 KB
testcase_14 WA -
testcase_15 AC 2 ms
4,372 KB
testcase_16 WA -
testcase_17 AC 2 ms
4,372 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 2 ms
4,372 KB
testcase_22 AC 2 ms
4,372 KB
testcase_23 AC 2 ms
4,372 KB
testcase_24 AC 2 ms
4,372 KB
testcase_25 WA -
testcase_26 AC 2 ms
4,372 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 1 ms
4,372 KB
testcase_30 WA -
testcase_31 AC 2 ms
4,372 KB
testcase_32 AC 2 ms
4,372 KB
testcase_33 AC 2 ms
4,372 KB
testcase_34 AC 2 ms
4,372 KB
testcase_35 AC 2 ms
4,372 KB
testcase_36 WA -
testcase_37 AC 2 ms
4,372 KB
testcase_38 AC 2 ms
4,372 KB
testcase_39 AC 2 ms
4,372 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 AC 2 ms
4,372 KB
testcase_46 WA -
testcase_47 AC 2 ms
4,372 KB
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 AC 2 ms
4,372 KB
testcase_52 AC 2 ms
4,372 KB
testcase_53 AC 2 ms
4,372 KB
testcase_54 AC 2 ms
4,372 KB
testcase_55 WA -
testcase_56 WA -
testcase_57 WA -
testcase_58 AC 2 ms
4,372 KB
testcase_59 WA -
testcase_60 AC 2 ms
4,372 KB
testcase_61 WA -
testcase_62 WA -
testcase_63 AC 2 ms
4,372 KB
testcase_64 AC 2 ms
4,372 KB
testcase_65 AC 2 ms
4,372 KB
testcase_66 WA -
testcase_67 WA -
testcase_68 WA -
testcase_69 AC 2 ms
4,372 KB
testcase_70 AC 2 ms
4,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

//template
#define rep(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define ALL(v) (v).begin(),(v).end()
typedef long long int ll;
const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12;
template<typename T>inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<typename T>inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
//end

double R,H,D,a;
double inte(double x){
   double res;
   res=16*a*a*a*x*x*x*acos(D/2./a/x);
   res-=2*a*D*x*(a*x*sqrt(4-D*D/a/a/x/x)+3*sqrt(4*a*a*x*x-D*D));
   res-=D*D*D*log(x*(sqrt(4-D*D/a/a/x/x)+2));
   res+=3*D*D*D*log(a*(sqrt(4*a*a*x*x-D*D)+2*a*x));
   return res/a/24.;
}

int main(){
   cin>>R>>H>>D;
   double res=0; a=R/H;
   res=inte(H)-inte(D/a/2.);
   printf("%.12f\n",res);
   return 0;
}
0