結果

問題 No.23 技の選択
ユーザー kosakkunkosakkun
提出日時 2016-12-06 17:52:48
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 1,053 bytes
コンパイル時間 792 ms
コンパイル使用メモリ 91,532 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-28 03:09:58
合計ジャッジ時間 1,570 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
#include <iomanip>
#include <deque>
using namespace std;
typedef long long ll;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define RREP(i,n) for(int (i)=(int)(n)-1;i>=0;i--)
#define FOREACH(i,Itr) for(auto (i)=(Itr).begin();(i)!=(Itr).end();(i)++)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())
#define LBOUND(Itr,val) lower_bound((Itr).begin(),(Itr).end(),(val))
#define UBOUND(Itr,val) upper_bound((Itr).begin(),(Itr).end(),(val))


int main(){
    
    int H,A,D; cin>>H>>A>>D;
    double ans1=(H%A==0)?H/A:H/A+1;
    double ans2=0.0;
    for(double i=0.0;i<10010.0;i+=1.0){
        if(i*D>=H){
            ans2=i*1.5;
            cout<<min(ans1,ans2)<<endl;
            return 0;
        }
    }
    
    return 0;
}
0