結果

問題 No.1319 最強とんがりコーン
ユーザー KudeKude
提出日時 2020-12-16 13:36:22
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,229 bytes
コンパイル時間 4,194 ms
コンパイル使用メモリ 217,204 KB
実行使用メモリ 4,368 KB
最終ジャッジ日時 2023-10-20 09:27:57
合計ジャッジ時間 53,039 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 706 ms
4,368 KB
testcase_03 AC 745 ms
4,368 KB
testcase_04 WA -
testcase_05 AC 679 ms
4,368 KB
testcase_06 AC 696 ms
4,368 KB
testcase_07 AC 741 ms
4,368 KB
testcase_08 AC 694 ms
4,368 KB
testcase_09 AC 673 ms
4,368 KB
testcase_10 AC 876 ms
4,368 KB
testcase_11 AC 722 ms
4,368 KB
testcase_12 AC 688 ms
4,368 KB
testcase_13 AC 715 ms
4,368 KB
testcase_14 AC 797 ms
4,368 KB
testcase_15 AC 709 ms
4,368 KB
testcase_16 AC 778 ms
4,368 KB
testcase_17 WA -
testcase_18 AC 758 ms
4,368 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 700 ms
4,368 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 AC 726 ms
4,368 KB
testcase_41 AC 893 ms
4,368 KB
testcase_42 AC 813 ms
4,368 KB
testcase_43 AC 876 ms
4,368 KB
testcase_44 AC 803 ms
4,368 KB
testcase_45 AC 907 ms
4,368 KB
testcase_46 AC 679 ms
4,368 KB
testcase_47 AC 848 ms
4,368 KB
testcase_48 AC 722 ms
4,368 KB
testcase_49 AC 834 ms
4,368 KB
testcase_50 AC 857 ms
4,368 KB
testcase_51 AC 909 ms
4,368 KB
testcase_52 AC 873 ms
4,368 KB
testcase_53 AC 909 ms
4,368 KB
testcase_54 AC 779 ms
4,368 KB
testcase_55 AC 806 ms
4,368 KB
testcase_56 AC 886 ms
4,368 KB
testcase_57 AC 908 ms
4,368 KB
testcase_58 AC 906 ms
4,368 KB
testcase_59 AC 909 ms
4,368 KB
testcase_60 AC 353 ms
4,368 KB
testcase_61 AC 353 ms
4,368 KB
testcase_62 AC 353 ms
4,368 KB
testcase_63 AC 353 ms
4,368 KB
testcase_64 AC 693 ms
4,368 KB
testcase_65 AC 695 ms
4,368 KB
testcase_66 AC 352 ms
4,368 KB
testcase_67 WA -
testcase_68 AC 668 ms
4,368 KB
testcase_69 WA -
testcase_70 AC 836 ms
4,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = (n)-1; i >= 0; --i)
#define chmax(a, b) a = max(a, b)
#define chmin(a, b) a = min(a, b)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using ll = long long;
using P = pair<int,int>;
using VI = vector<int>;
using VVI = vector<VI>;
using VL = vector<ll>;
using VVL = vector<VL>;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(12);
    double rmax, h, d;
    cin >> rmax >> h >> d;
    const double rmin = d / 2;
    constexpr int num = 3e7;
    const double rstep = (rmax - rmin) / num;
    double ans = 0;
    rep(i, num) {
    //for(double r = rmin; r < rmax; r += rstep) {
        const double r = rmin + rstep * i;
        double t = acos(d / 2 / r);
        //ans += r * r * (2 * t - sin(2 * t));
        double x = 2 * t;
        double x2 = x * x;
        ans += r * r * (x2 * x / 6 * (1 - x2 / 20 * (1 - x2 / 42 * (1 - x2 / 72 * (1 - x2 / 110 * (1 - x2 / 156))))));
    }
    ans *= rstep * h / rmax;
    cout << ans << endl;
}
0