結果
| 問題 | No.555 世界史のレポート |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-11 23:09:30 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 820 bytes |
| 記録 | |
| コンパイル時間 | 572 ms |
| コンパイル使用メモリ | 125,568 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-30 01:37:29 |
| 合計ジャッジ時間 | 1,432 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 19 |
ソースコード
#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "iomanip"
#include "random"
using namespace std;
const long long int MOD = 1000000007;
const long double EPS = 0.00000001;
long long int N, M, K, Q, W, H, L, R;
long long int ans;
int main() {
ios::sync_with_stdio(false);
cin >> N;
cin >> K >> Q;
ans = 1000000000;
long long int box = 1;
long long int bag = 1;
for (int i = 1; i < 100; i++) {
box = 1;
long long int c = 0;
for (int j = 1; j <= i; j++) {
bag = box;
box += bag;
c += K + Q;
if (box >= N) {
break;
}
}
if (box < N) {
c += (N - box) / bag + !!((N - box) % bag);
}
ans = min(ans, c);
}
cout << ans << endl;
return 0;
}