結果
| 問題 |
No.23 技の選択
|
| コンテスト | |
| ユーザー |
Konton7
|
| 提出日時 | 2020-02-02 23:47:52 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 641 bytes |
| コンパイル時間 | 2,304 ms |
| コンパイル使用メモリ | 194,704 KB |
| 最終ジャッジ日時 | 2025-01-08 21:56:08 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = std::pair<int, int>;
using PLL = std::pair<ll, ll>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main()
{
#ifdef DEBUG
cout << "DEBUG MODE" << endl;
ifstream in("input.txt"); //for debug
cin.rdbuf(in.rdbuf()); //for debug
#endif
int h, a, d;
cin >> h >> a >> d;
vector<double> e;
rep(i, (h + a - 1) / a)
e.push_back( ((h - a * i) + d - 1) / d * 1.5);
rep(i, e.size())
e[i] += i;
e.push_back((h + a - 1) / a);
cout << *min_element(e.begin(), e.end()) << endl;
return 0;
}
Konton7