結果
問題 | No.2352 Sharpened Knife in Fall |
ユーザー |
![]() |
提出日時 | 2023-06-16 21:44:05 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 556 ms / 3,000 ms |
コード長 | 554 bytes |
コンパイル時間 | 4,055 ms |
コンパイル使用メモリ | 250,408 KB |
最終ジャッジ日時 | 2025-02-14 04:57:16 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 |
ソースコード
#include<bits/stdc++.h> #include<atcoder/all> using namespace std; using namespace atcoder; typedef modint998244353 mint; typedef long long ll; int main(){ cout << fixed << setprecision(15); double r; int k; cin >> r >> k; const double pi = 3.1415926535897932384626; for (int i=1; i<k+1; i++){ double ub = pi; double lb = 0; for (int num=0; num<77; num++){ double targ = (ub + lb) / 2; if (targ / 2 - sin(2 * targ) / 4 >= pi * (k+1-i) / 2 / (k+1)){ ub = targ; }else{ lb = targ; } } cout << cos(ub) * r << endl; } }