結果

問題 No.2352 Sharpened Knife in Fall
ユーザー shobonvipshobonvip
提出日時 2023-06-16 21:44:05
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 538 ms / 3,000 ms
コード長 554 bytes
コンパイル時間 4,333 ms
コンパイル使用メモリ 259,556 KB
実行使用メモリ 4,388 KB
最終ジャッジ日時 2023-09-06 19:08:56
合計ジャッジ時間 18,514 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,384 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 457 ms
4,380 KB
testcase_05 AC 2 ms
4,388 KB
testcase_06 AC 525 ms
4,380 KB
testcase_07 AC 268 ms
4,376 KB
testcase_08 AC 538 ms
4,380 KB
testcase_09 AC 534 ms
4,384 KB
testcase_10 AC 532 ms
4,380 KB
testcase_11 AC 536 ms
4,384 KB
testcase_12 AC 528 ms
4,380 KB
testcase_13 AC 528 ms
4,380 KB
testcase_14 AC 255 ms
4,384 KB
testcase_15 AC 499 ms
4,380 KB
testcase_16 AC 28 ms
4,380 KB
testcase_17 AC 14 ms
4,384 KB
testcase_18 AC 190 ms
4,384 KB
testcase_19 AC 406 ms
4,384 KB
testcase_20 AC 164 ms
4,388 KB
testcase_21 AC 157 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
	}
}
0