結果

問題 No.555 世界史のレポート
ユーザー face4
提出日時 2018-10-16 22:12:53
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 406 bytes
コンパイル時間 505 ms
コンパイル使用メモリ 64,044 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-12 18:45:42
合計ジャッジ時間 1,282 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;

int main(){
    int n, c, v;
    cin >> n >> c >> v;

    int ans = c+v, len = 2, clip = 1;

    while(len < n){
        if(clip == len || (n-len+clip-1)/clip*v < c+(n-len+clip+len-1)/(clip+len)*v){
            ans += v;
            len += clip;
        }else{
            ans += c;
            clip = len;
        }
    }

    cout << ans << endl;

    return 0;
}
0