import java.util.Scanner; public class cade { public static void main(String[] args) { Scanner s = new Scanner(System.in); int[] A = new int[4]; for(int i=0;i<4;i++){ A[i] = Integer.parseInt(s.next()); } int h = A[1] * 60; int maxmin = h + A[2]; for(int i=0;i