#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define FOR(i,a,b) for(ll i=(a);i<(b);++i) #define ALL(v) (v).begin(), (v).end() #define p(s) cout<<(s)<> N >> K; if(N<=K){ p(1); return 0; } ll left = 0; ll right = inf; while(left+1!=right){ ll center = (left+right)/2; if(can_beat(center)){ right = center; }else{ left = center; } } p(right); return 0; }