結果
| 問題 | No.598 オーバーフローファンタジー |
| コンテスト | |
| ユーザー |
hanorver
|
| 提出日時 | 2017-11-26 20:20:39 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 415 bytes |
| 記録 | |
| コンパイル時間 | 486 ms |
| コンパイル使用メモリ | 96,868 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-31 19:45:47 |
| 合計ジャッジ時間 | 1,703 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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