結果

問題 No.1319 最強とんがりコーン
ユーザー kotatsugamekotatsugame
提出日時 2020-12-17 02:13:06
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 347 bytes
コンパイル時間 625 ms
コンパイル使用メモリ 73,428 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-20 10:29:02
合計ジャッジ時間 39,451 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 889 ms
4,348 KB
testcase_01 AC 919 ms
4,348 KB
testcase_02 AC 500 ms
4,348 KB
testcase_03 AC 253 ms
4,348 KB
testcase_04 AC 1,034 ms
4,348 KB
testcase_05 AC 895 ms
4,348 KB
testcase_06 AC 555 ms
4,348 KB
testcase_07 AC 305 ms
4,348 KB
testcase_08 AC 585 ms
4,348 KB
testcase_09 AC 1,003 ms
4,348 KB
testcase_10 AC 63 ms
4,348 KB
testcase_11 AC 362 ms
4,348 KB
testcase_12 AC 637 ms
4,348 KB
testcase_13 AC 390 ms
4,348 KB
testcase_14 AC 122 ms
4,348 KB
testcase_15 AC 425 ms
4,348 KB
testcase_16 AC 152 ms
4,348 KB
testcase_17 AC 1,187 ms
4,348 KB
testcase_18 AC 192 ms
4,348 KB
testcase_19 AC 1,180 ms
4,348 KB
testcase_20 AC 885 ms
4,348 KB
testcase_21 AC 922 ms
4,348 KB
testcase_22 AC 874 ms
4,348 KB
testcase_23 AC 882 ms
4,348 KB
testcase_24 AC 879 ms
4,348 KB
testcase_25 AC 904 ms
4,348 KB
testcase_26 AC 880 ms
4,348 KB
testcase_27 AC 873 ms
4,348 KB
testcase_28 AC 870 ms
4,348 KB
testcase_29 AC 873 ms
4,348 KB
testcase_30 AC 895 ms
4,348 KB
testcase_31 AC 891 ms
4,348 KB
testcase_32 AC 544 ms
4,348 KB
testcase_33 AC 1,172 ms
4,348 KB
testcase_34 AC 875 ms
4,348 KB
testcase_35 AC 909 ms
4,348 KB
testcase_36 AC 886 ms
4,348 KB
testcase_37 AC 905 ms
4,348 KB
testcase_38 AC 888 ms
4,348 KB
testcase_39 AC 1,018 ms
4,348 KB
testcase_40 AC 364 ms
4,348 KB
testcase_41 WA -
testcase_42 AC 107 ms
4,348 KB
testcase_43 AC 62 ms
4,348 KB
testcase_44 AC 116 ms
4,348 KB
testcase_45 WA -
testcase_46 AC 827 ms
4,348 KB
testcase_47 AC 77 ms
4,348 KB
testcase_48 AC 362 ms
4,348 KB
testcase_49 AC 85 ms
4,348 KB
testcase_50 AC 70 ms
4,348 KB
testcase_51 WA -
testcase_52 AC 63 ms
4,348 KB
testcase_53 WA -
testcase_54 AC 147 ms
4,348 KB
testcase_55 AC 114 ms
4,348 KB
testcase_56 WA -
testcase_57 WA -
testcase_58 WA -
testcase_59 WA -
testcase_60 AC 2 ms
4,348 KB
testcase_61 AC 2 ms
4,348 KB
testcase_62 AC 2 ms
4,348 KB
testcase_63 AC 2 ms
4,348 KB
testcase_64 AC 567 ms
4,348 KB
testcase_65 AC 564 ms
4,348 KB
testcase_66 AC 2 ms
4,348 KB
testcase_67 AC 865 ms
4,348 KB
testcase_68 AC 1,107 ms
4,348 KB
testcase_69 AC 867 ms
4,348 KB
testcase_70 AC 85 ms
4,348 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
const int dx=1<<25;
double R,H,D;
main()
{
	cin>>R>>H>>D;
	double ans=0;
	for(int cnt=0;cnt<dx;cnt++)
	{
		double r=(1-(double)cnt/dx)*R;
		if(r+r<=D)break;
		double theta=2*acos(D/2/r);
		ans+=r*r*theta-r*r*sin(theta);
	}
	cout<<fixed<<setprecision(16)<<ans*H/dx<<endl;
}
0