Driver code
int main ( ) { int range [ ] [ 3 ] = { { 1 , 2 , 3 } , { 2 , 5 , 1 } , { 3 , 10 , 1 } , { 4 , 4 , 1 } , { 5 , 7 , 10 } } ; int n = sizeof ( range ) / sizeof ( range [ 0 ] ) ; if ( isPossible ( range , n ) ) cout << " Yes " ; else cout << " No " ; return 0 ; }