結果
問題 | No.598 オーバーフローファンタジー |
ユーザー | 0x19f |
提出日時 | 2017-11-24 22:43:07 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 269 bytes |
コンパイル時間 | 1,370 ms |
コンパイル使用メモリ | 158,756 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 01:45:04 |
合計ジャッジ時間 | 2,250 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
#include <bits/stdc++.h> #define REP(i, a, n) for(ll i = ((ll) a); i < ((ll) n); i++) using namespace std; typedef long long ll; ll N, X, A, B; int main(void) { cin >> N >> X >> A >> B; cout << min((X + A - 1) / A, ((1LL << (N - 1)) - X + B - 1) / B) << endl; }