結果
| 問題 |
No.23 技の選択
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-10-15 11:04:31 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 389 bytes |
| コンパイル時間 | 1,378 ms |
| コンパイル使用メモリ | 64,644 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-28 17:12:51 |
| 合計ジャッジ時間 | 1,558 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
ソースコード
#include <iostream>
#include <cstdint>
#include <algorithm>
#include <iomanip>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int h, a, d;
cin >> h >> a >> d;
double dp[10001];
for (int i = 1; i <= h; i++) {
dp[i] = min(dp[max(0, i - a)] + 1, dp[max(0, i - d)] + 1.5);
}
cout << fixed << setprecision(2) << dp[h] << endl;
return 0;
}