結果
| 問題 |
No.598 オーバーフローファンタジー
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-01 23:38:40 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 301 bytes |
| コンパイル時間 | 505 ms |
| コンパイル使用メモリ | 62,848 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-27 22:47:59 |
| 合計ジャッジ時間 | 1,432 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 WA * 5 |
ソースコード
#include <iostream>
using namespace std;
int main() {
int n;
long long x, a, b;
cin >> n >> x >> a >> b;
int y = (1 << (n - 1));
// cout << y << ", " << y - x << ", " << y - x + b - 1 << endl;
int ans = min(
(x + a - 1) / a,
(y - x + b - 1) / b
);
cout << ans << endl;
return 0;
}