結果

問題 No.598 オーバーフローファンタジー
コンテスト
ユーザー tetsuzuki1115
提出日時 2018-04-22 17:17:10
言語 C++14
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 535 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 703 ms
コンパイル使用メモリ 99,072 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2026-03-14 13:27:46
合計ジャッジ時間 1,331 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <cmath>
#include <limits.h>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <functional>
#include <stdio.h>
using namespace std;

long long MOD = 1000000007;

int main() {

    unsigned int N,X,A,B;
    cin >> N >> X >> A >> B;
    A = ( X/A )+( X%A ? 1 : 0 );
    unsigned int a = 1<<(N-1);
    // cout << a << endl;
    B = (a-X)/B + ( (a-X)%B ? 1 : 0 );
    cout << min( A,B ) << endl;
    return 0;
}
0