結果

問題 No.68 よくある棒を切る問題 (2)
ユーザー tailstails
提出日時 2020-09-30 11:01:36
言語 cLay
(20240104-1)
結果
AC  
実行時間 154 ms / 5,000 ms
コード長 243 bytes
コンパイル時間 2,357 ms
コンパイル使用メモリ 168,048 KB
実行使用メモリ 11,268 KB
最終ジャッジ日時 2023-09-19 01:25:41
合計ジャッジ時間 10,296 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 153 ms
11,068 KB
testcase_01 AC 154 ms
11,268 KB
testcase_02 AC 154 ms
11,164 KB
testcase_03 AC 150 ms
11,120 KB
testcase_04 AC 153 ms
11,240 KB
testcase_05 AC 152 ms
11,080 KB
testcase_06 AC 151 ms
10,712 KB
testcase_07 AC 152 ms
10,936 KB
testcase_08 AC 145 ms
10,672 KB
testcase_09 AC 148 ms
10,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

priority_queue<pair<double,ll>>q;
double z[5d5];
ll n;
{
	rd(n);
	REP(n)rd(n),q.push({n,1});
	rep[z](a,5d5){
		auto p=q.top();
		q.pop();
		a=p.first;
		q.push({p.first*p.second/(p.second+1),p.second+1});
	}
	rd(n);
	REP(n)rd(n),wt(z[n-1]);
}
0