結果
| 問題 | No.555 世界史のレポート |
| コンテスト | |
| ユーザー |
kotamanegi
|
| 提出日時 | 2017-08-11 22:50:55 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,280 bytes |
| 記録 | |
| コンパイル時間 | 899 ms |
| コンパイル使用メモリ | 99,696 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2024-10-12 21:34:00 |
| 合計ジャッジ時間 | 4,455 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 2 TLE * 1 -- * 9 |
ソースコード
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
#include <random>
#include<map>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include<fstream>
#include <unordered_map>
using namespace std;
#define eps 0.00000001
#define LONG_INF 10000000000000000
#define GOLD 1.61803398874989484820458
#define MAX_MOD 1000000007
#define REP(i,n) for(long long i = 0;i < n;++i)
long long n;
long long c, v;
int main() {
cin >> n >> c >> v;
long long ans = 1000000000000;
for (int i = 0;i < n;++i) {
long long now_length = 100000;
for (int q = 1;q < n+2;++q) {
long long now = 1;
long long stock = 1;
for (int j = 0;j >= 0;++j) {
stock += now;
if ((j + 1) % q == 0&&(j+1)/q <= i) {
now = stock;
}
if (stock >= n) {
if (now_length >= j+1) {
now_length = j+1;
break;
}
else goto ending;
}
}
}
ending:;
ans = min(ans, now_length*v + c*i);
}
cout << ans+c << endl;
return 0;
}
kotamanegi