Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <cmath>#include <cstdio>#include <cstring>#include <iostream>#include <algorithm>using namespace std;struct node{int t, z;};bool cmp(node a, node b){return a.z < b.z;}int calc(int a, int b, int c, int d){if ((a<2 || (a==2 && b < 4)) && c<6) return (a*10+b)*60+c*10+d;return -1;}int main(){node t[4];int ans[4], maxt = -1, temp;for (int i = 0; i < 4; i++) cin >> t[i].t, t[i].z = i;do {temp = calc(t[0].t, t[1].t, t[2].t, t[3].t);if (maxt < temp)