#include using namespace std; int main(){ int H,M,h,m,N,ans=0; cin >> N; for(int i=0;i