結果
| 問題 |
No.598 オーバーフローファンタジー
|
| コンテスト | |
| ユーザー |
ats5515
|
| 提出日時 | 2017-11-24 22:26:52 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 549 bytes |
| コンパイル時間 | 735 ms |
| コンパイル使用メモリ | 79,848 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-26 01:33:26 |
| 合計ジャッジ時間 | 1,856 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <stdio.h>
using namespace std;
#define int long long
int MOD = 1000000007;
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, X, A, B;
cin >> N;
cin >> X;
cin >> A;
cin >> B;
int res = (X + A - 1) / A;
cerr << res << endl;
cerr << (((int)1 << (N - 1)) - X + B - 1) / B << endl;
res = min(res, (((int)1 << (N - 1)) - X + B - 1) / B);
cout << res << endl;
}
ats5515