結果
問題 | No.23 技の選択 |
ユーザー | kotatsugame |
提出日時 | 2019-10-15 06:28:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 261 bytes |
コンパイル時間 | 782 ms |
コンパイル使用メモリ | 72,064 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 02:24:44 |
合計ジャッジ時間 | 2,095 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
コンパイルメッセージ
main.cpp:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 7 | main() | ^~~~
ソースコード
#include<iostream> #include<iomanip> #include<algorithm> using namespace std; int H,A,D; double dp[1<<17]; main() { cin>>H>>A>>D; for(int i=1;i<=H;i++) { dp[i]=min(1+(i>=A?dp[i-A]:0),1.5+(i>=D?dp[i-D]:0)); } cout<<fixed<<setprecision(15)<<dp[H]<<endl; }