結果

問題 No.2352 Sharpened Knife in Fall
ユーザー hourenhouren
提出日時 2023-06-16 22:11:16
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 702 ms / 3,000 ms
コード長 869 bytes
コンパイル時間 1,482 ms
コンパイル使用メモリ 165,368 KB
実行使用メモリ 4,388 KB
最終ジャッジ日時 2023-09-06 20:09:10
合計ジャッジ時間 17,338 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 617 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 691 ms
4,376 KB
testcase_07 AC 350 ms
4,376 KB
testcase_08 AC 693 ms
4,376 KB
testcase_09 AC 702 ms
4,376 KB
testcase_10 AC 699 ms
4,380 KB
testcase_11 AC 700 ms
4,380 KB
testcase_12 AC 694 ms
4,376 KB
testcase_13 AC 699 ms
4,380 KB
testcase_14 AC 327 ms
4,380 KB
testcase_15 AC 656 ms
4,376 KB
testcase_16 AC 35 ms
4,376 KB
testcase_17 AC 17 ms
4,380 KB
testcase_18 AC 253 ms
4,388 KB
testcase_19 AC 549 ms
4,376 KB
testcase_20 AC 215 ms
4,380 KB
testcase_21 AC 207 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ld = long double;
#define fix(x) fixed << setprecision(x)
#define asc(x) x, vector<x>, greater<x>
#define rep(i, n) for(ld i = 0; i < n; i++)
#define all(x) (x).begin(),(x).end()
template<class T>bool chmin(T&a, const T&b){if(a>b){a=b;return 1;}return 0;}
template<class T>bool chmax(T&a, const T&b){if(a<b){a=b;return 1;}return 0;}
constexpr int INF = (1 << 30);
constexpr ld pi = 3.14159265358979323846;

ld f(ld x){ return asin(x)+x*sqrt(1-x*x)+pi/2; }

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    ld r,k;
    cin >> r >> k;
    cout << fix(16);
    rep(i,k){
        ld ok = -1, ng = 1;
        rep(Dark_hourensou,100){
            ld md = (ok+ng)/2;
            if(f(md)<=pi*(i+1)/(k+1)) ok = md;
            else ng = md;
        }
        cout << ok*r << '\n';
    }
    return 0;
}
0