結果
| 問題 | No.23 技の選択 | 
| コンテスト | |
| ユーザー |  togari_takamoto | 
| 提出日時 | 2016-02-25 21:49:45 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 909 bytes | 
| コンパイル時間 | 1,273 ms | 
| コンパイル使用メモリ | 159,492 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-09-22 13:46:50 | 
| 合計ジャッジ時間 | 2,251 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 25 WA * 8 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi  = vector<int>; using vb  = vector<bool>; using vd  = vector<double>; using vl  = vector<ll>;
using vvi = vector<vi>;  using vvb = vector<vb>;   using vvd = vector<vd>;     using vvl = vector<vl>;
#define REP(i,n) for(ll i=0; i<(n); ++i)
#define FOR(i,b,n) for(ll i=(b); i<(n); ++i)
#define ALL(v) (v).begin(), (v).end()
#define TEN(x) ((ll)1e##x)
int main() {
	// cin.tie(0);
	// ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(5);
	ll h, a, d;
	cin >> h >> a >> d;
	vd expect(TEN(4) + 1, TEN(4) * 2); expect[0] = 0;
	REP(i, expect.size()) {
		if (i + a < expect.size()) expect[i + a] = min(expect[i + a], expect[i] + 1);
		if (i + d < expect.size()) expect[i + d] = min(expect[i + d], expect[i] + 1.5);
	}
	double v = TEN(4)*2;
	FOR(i, h, expect.size()) v = min(v, expect[i]);	
	cout << v << endl;
	return 0;
}
            
            
            
        