結果

問題 No.1319 最強とんがりコーン
ユーザー t33ft33f
提出日時 2020-12-16 22:24:32
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 392 ms / 2,000 ms
コード長 459 bytes
コンパイル時間 869 ms
コンパイル使用メモリ 86,112 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-20 09:55:10
合計ジャッジ時間 14,744 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 292 ms
4,348 KB
testcase_01 AC 305 ms
4,348 KB
testcase_02 AC 164 ms
4,348 KB
testcase_03 AC 82 ms
4,348 KB
testcase_04 AC 342 ms
4,348 KB
testcase_05 AC 291 ms
4,348 KB
testcase_06 AC 182 ms
4,348 KB
testcase_07 AC 99 ms
4,348 KB
testcase_08 AC 192 ms
4,348 KB
testcase_09 AC 329 ms
4,348 KB
testcase_10 AC 20 ms
4,348 KB
testcase_11 AC 118 ms
4,348 KB
testcase_12 AC 207 ms
4,348 KB
testcase_13 AC 127 ms
4,348 KB
testcase_14 AC 40 ms
4,348 KB
testcase_15 AC 139 ms
4,348 KB
testcase_16 AC 49 ms
4,348 KB
testcase_17 AC 392 ms
4,348 KB
testcase_18 AC 63 ms
4,348 KB
testcase_19 AC 391 ms
4,348 KB
testcase_20 AC 296 ms
4,348 KB
testcase_21 AC 306 ms
4,348 KB
testcase_22 AC 288 ms
4,348 KB
testcase_23 AC 297 ms
4,348 KB
testcase_24 AC 292 ms
4,348 KB
testcase_25 AC 302 ms
4,348 KB
testcase_26 AC 293 ms
4,348 KB
testcase_27 AC 291 ms
4,348 KB
testcase_28 AC 289 ms
4,348 KB
testcase_29 AC 288 ms
4,348 KB
testcase_30 AC 297 ms
4,348 KB
testcase_31 AC 295 ms
4,348 KB
testcase_32 AC 177 ms
4,348 KB
testcase_33 AC 385 ms
4,348 KB
testcase_34 AC 290 ms
4,348 KB
testcase_35 AC 301 ms
4,348 KB
testcase_36 AC 295 ms
4,348 KB
testcase_37 AC 300 ms
4,348 KB
testcase_38 AC 293 ms
4,348 KB
testcase_39 AC 337 ms
4,348 KB
testcase_40 AC 119 ms
4,348 KB
testcase_41 AC 18 ms
4,348 KB
testcase_42 AC 35 ms
4,348 KB
testcase_43 AC 20 ms
4,348 KB
testcase_44 AC 38 ms
4,348 KB
testcase_45 AC 12 ms
4,348 KB
testcase_46 AC 271 ms
4,348 KB
testcase_47 AC 25 ms
4,348 KB
testcase_48 AC 118 ms
4,348 KB
testcase_49 AC 28 ms
4,348 KB
testcase_50 AC 23 ms
4,348 KB
testcase_51 AC 14 ms
4,348 KB
testcase_52 AC 21 ms
4,348 KB
testcase_53 AC 8 ms
4,348 KB
testcase_54 AC 48 ms
4,348 KB
testcase_55 AC 37 ms
4,348 KB
testcase_56 AC 19 ms
4,348 KB
testcase_57 AC 10 ms
4,348 KB
testcase_58 AC 9 ms
4,348 KB
testcase_59 AC 7 ms
4,348 KB
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 186 ms
4,348 KB
testcase_65 AC 186 ms
4,348 KB
testcase_66 AC 2 ms
4,348 KB
testcase_67 AC 288 ms
4,348 KB
testcase_68 AC 365 ms
4,348 KB
testcase_69 AC 287 ms
4,348 KB
testcase_70 AC 28 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
    double R, H, D; cin >> R >> H >> D;
    double ans = 0;
    const double hmax = H * (1 - D / 2 / R),
        dh = H * 1e-7;
    for (double h = dh * 0.5; h < hmax; h += dh) {
        const double rh = R * (1 - h / H),
            theta = 2 * acos(D / 2 / rh);
        ans += dh * rh * rh * (theta - sin(theta));
    }
    cout << setprecision(12) << ans << endl;
}
0