結果
| 問題 | No.598 オーバーフローファンタジー |
| コンテスト | |
| ユーザー |
DAyamaCTF
|
| 提出日時 | 2017-11-24 22:42:28 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 261 bytes |
| 記録 | |
| コンパイル時間 | 1,305 ms |
| コンパイル使用メモリ | 174,724 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-21 14:02:05 |
| 合計ジャッジ時間 | 3,053 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 WA * 4 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define repl(i,a,b) for(int i=(int)a;i<(int)b;i++)
#define rep(i,n) repl(i,0,n)
int main(){
int n,a,b,x;
cin>>n>>x>>a>>b;
int m=pow(2,n-2)-1+pow(2,n-2);
cout<<min((x+a-1)/a,(m-x+b)/b)<<endl;
return 0;
}
DAyamaCTF