結果
問題 | No.598 オーバーフローファンタジー |
ユーザー |
![]() |
提出日時 | 2017-11-24 22:46:05 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 275 bytes |
コンパイル時間 | 1,333 ms |
コンパイル使用メモリ | 158,760 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-22 23:41:21 |
合計ジャッジ時間 | 2,323 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 WA * 1 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long int ll;#define repl(i,a,b) for(int i=(int)a;i<(int)b;i++)#define rep(i,n) repl(i,0,n)int main(){ll n,a,b,x;cin>>n>>x>>a>>b;ll m=pow(2LL,n-1)-1;cout<<min((x+a)/a,(m-x+b)/b)<<endl;return 0;}