結果
| 問題 | No.598 オーバーフローファンタジー |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-11-22 16:36:11 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 343 bytes |
| 記録 | |
| コンパイル時間 | 329 ms |
| コンパイル使用メモリ | 76,164 KB |
| 実行使用メモリ | 9,924 KB |
| 最終ジャッジ日時 | 2026-11-22 16:36:18 |
| 合計ジャッジ時間 | 5,601 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 28 |
ソースコード
#include <iostream>
#include <cstdio>
using namespace std;
int n, x, a, b, ma_health;
int main() {
freopen("fantasy.in", "r", stdin);
freopen("fantasy.out", "w", stdout);
scanf("%d%d%d%d", &n, &x, &a, &b);
ma_health = 1 << (n - 1);
printf("%d\n", min((x + a - 1) / a, (ma_health - x + b - 1) / b));
return 0;
}