#include using namespace std; using ll = long long; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b>a>>b>>c; ll merit = 60*a - b; if(merit<=0){ p(-1); return 0; } ll bunsi = 3600*c; ll bunbo = 60*a-b; ll x; if(bunsi % bunbo ==0){ x = bunsi/bunbo; }else{ x = bunsi/bunbo + 1; } p(x); return 0; }