結果
| 問題 |
No.598 オーバーフローファンタジー
|
| ユーザー |
hanorver
|
| 提出日時 | 2017-11-26 20:20:39 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 415 bytes |
| コンパイル時間 | 641 ms |
| コンパイル使用メモリ | 81,208 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-26 01:57:57 |
| 合計ジャッジ時間 | 1,491 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <stack>
#include <cmath>
#include <queue>
#include <numeric>
int main()
{
long long n, x, a, b;
std::cin >> n >> x >> a >> b;
long long kaihuku = std::ceil(((1LL << (n - 1)) - x) / (double)b);
long long attack = std::ceil(x / (double)a);
std::cout << std::min(kaihuku, attack) << std::endl;
return 0;
}
hanorver