If current number does not exceed N
if ( stoi ( l [ i ] + temp2 [ j ] ) > N ) { flag = 1 ; break ; } total . push_back ( l [ i ] + temp2 [ j ] ) ; temp3 . push_back ( l [ i ] + temp2 [ j ] ) ; } if ( flag == 1 ) break ; } if ( flag == 1 ) break ; l = temp3 ; vector < string > temp3 ; }