#include using namespace std; using Int=long long; using Real=long double; templateinline bool chmin(T&A,S B){if(A>B){A=B;return true;}else{return false;}} templateinline bool chmax(T&A,S B){if(A>N>>H>>M>>T; M+=(N-1)*T; H+=M/60; M%=60; H%=24; cout<>TE; while(TE--)sol(); }