結果
問題 | No.598 オーバーフローファンタジー |
ユーザー |
|
提出日時 | 2017-11-30 19:47:41 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 705 bytes |
コンパイル時間 | 2,436 ms |
コンパイル使用メモリ | 178,884 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 01:59:05 |
合計ジャッジ時間 | 3,260 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
#include <bits/stdc++.h>#include <ext/pb_ds/assoc_container.hpp>#include <ext/pb_ds/tree_policy.hpp>using namespace std;using namespace __gnu_pbds;#define fi first#define se second#define mp make_pair#define pb push_back#define fbo find_by_order#define ook order_of_keytypedef long long ll;typedef pair<ll,ll> ii;typedef vector<int> vi;typedef long double ld;typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> pbds;typedef set<ll>::iterator sit;typedef map<ll,ll>::iterator mit;int main(){ios_base::sync_with_stdio(0); cin.tie(0);ll n,x,a,b; cin>>n>>x>>a>>b;ll m1 = (x+a-1)/a;ll m2 = ((1LL<<(n-1))-x+b-1)/b;cout<<min(m1,m2)<<'\n';}