結果
問題 | No.598 オーバーフローファンタジー |
ユーザー |
|
提出日時 | 2020-05-05 04:20:32 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 220 bytes |
コンパイル時間 | 1,998 ms |
コンパイル使用メモリ | 191,016 KB |
最終ジャッジ日時 | 2025-01-10 06:39:09 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
#include <bits/stdc++.h>#define rep(i,n) for(int i=0;i<(n);i++)using namespace std;using lint=long long;int main(){lint n,x,a,b; cin>>n>>x>>a>>b;cout<<min((x+a-1)/a,((1LL<<(n-1))-x+b-1)/b)<<'\n';return 0;}