結果
| 問題 | No.23 技の選択 |
| コンテスト | |
| ユーザー |
ふーらくたる
|
| 提出日時 | 2016-06-27 11:14:47 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 446 bytes |
| 記録 | |
| コンパイル時間 | 289 ms |
| コンパイル使用メモリ | 70,624 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-14 07:07:24 |
| 合計ジャッジ時間 | 4,267 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 RE * 14 |
ソースコード
#include <iostream>
using namespace std;
const int kMAX_H = 10010;
int H, A, D;
double memo[kMAX_H];
double E(int x) {
if (memo[x] >= 0) return memo[x];
if (x >= H) return memo[x] = 0.0;
double res;
res = min(E(x + A) + 1.0, E(x + D) + 3.0 / 2.0);
return memo[x] = res;
}
void Solve() {
fill(memo, memo + kMAX_H, -1.0);
cout << E(0) << endl;
}
int main() {
cin >> H >> A >> D;
Solve();
return 0;
}
ふーらくたる