結果
| 問題 |
No.598 オーバーフローファンタジー
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-24 22:50:55 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 346 bytes |
| コンパイル時間 | 1,586 ms |
| コンパイル使用メモリ | 165,992 KB |
| 実行使用メモリ | 6,816 KB |
| 最終ジャッジ日時 | 2024-12-22 23:41:41 |
| 合計ジャッジ時間 | 2,574 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 WA * 1 |
ソースコード
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define INF 120000000
using namespace std;
typedef pair<int, int> P;
typedef long long int LL;
int main() {
LL n, x, a, b;
cin >> n >> x >> a >> b;
LL mx = pow(2, n - 1) - 1;
LL cnt = min((mx - x) / b + 1, x / a + 1);
cout << cnt << endl;
return 0;
}