Utilitiy function to obtain maximum date or month or year
int getMax ( int arr [ ] [ 3 ] , int n , int q ) { int maxi = INT_MIN ; for ( int i = 0 ; i < n ; i ++ ) { maxi = max ( maxi , arr [ i ] [ q ] ) ; } return maxi ; }