Here , pos : keeps track of current position . f1 : is the flag to check if current number is less than N or not . pr : represents the previous digit
int dp ( int pos , int fl , int pr , string & bin ) {