array [ ] [ 0 ] start time array [ ] [ 1 ] advertising value
int array [ ] [ 2 ] = { { 0 , 10 } , { 4 , 110 } , { 5 , 30 } } ; int N = 3 ; int K = 4 ; int M = 6 ; cout << max_value ( array , M , K , N ) ; }