bool IsBefore(Time t1, Time t2) {
return t1.hour < t2.hour ||
t1.hour == t2.hour && t1.minute < t2.minute;
int Diff(Time t1, Time t2) {
return 60 * (tAfter.hour - tBefore.hour) + (tAfter.minute - tBefore.minute);
string First(Parking[] p) {
for (int i = 1; i < p.Length; i++) {
if (IsBefore(p[i].enter, p[idxMin].enter)) {
return Diff(p.enter, p.exit);
int SumMoney(Parking[] p) {
foreach (Parking q in p) {