#include using namespace std; #define ALL(x) x.begin(),x.end() #define rep(i,n) for(int i=0;i<(n);i++) #define debug(v) cout<<#v<<":";for(auto x:v){cout<bool chmax(T &a,const T &b){if(abool chmin(T &a,const T &b){if(b>x>>y>>h;x*=1000;y*=1000; if(x>y) swap(x,y); // x=x/2, y=y,h=h*2 // x=x, y=2*y, h=h*4とすればよい while(x>h){ ans++;y*=2;h*=4; } while(y>h){ ans++;x*=2;h*=4; } cout<