結果
問題 |
No.23 技の選択
|
ユーザー |
|
提出日時 | 2019-08-31 21:53:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 698 bytes |
コンパイル時間 | 1,111 ms |
コンパイル使用メモリ | 64,384 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-02 16:04:24 |
合計ジャッジ時間 | 5,914 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 8 RE * 25 |
ソースコード
/* * 023_sample.cpp * * No.23 Z̑I * Փx3 */ #include <iostream> #include <cstdio> static const int INF = 1e9+7; int main () { // W int H = 0; // GHP int A = 0; // ʏUŗ^_[W int D = 0; // KEZŗ^_[W std::cin >> H >> A >> D; // dp[G̎cHP]=G|̂ɂŏU double dp[H+1]; for (int i = 0; i < H+1; i++) { dp[i] = 0; } for (int i = H-1; 0 <= i; --i) { // cHP̑UƍU𑫂 // 菭ȂU߂ dp[i] = std::min(dp[i+A] + 1.0, dp[i+D] + 1.5); } // dp[0](cHP0)̂Ƃ̊Ғl std::cout << dp[0] << std::endl; return 0; }