結果
| 問題 | No.598 オーバーフローファンタジー |
| コンテスト | |
| ユーザー |
ats5515
|
| 提出日時 | 2017-11-24 22:26:52 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 384µs | |
| コード長 | 549 bytes |
| 記録 | |
| コンパイル時間 | 391 ms |
| コンパイル使用メモリ | 102,688 KB |
| 実行使用メモリ | 9,852 KB |
| 最終ジャッジ日時 | 2026-10-08 01:35:36 |
| 合計ジャッジ時間 | 1,884 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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