++


next_permutation()


template < class BidirectionalIterator >

bool

next_permutation( BidirectionalIterator first,

BidirectionalIterator last );

template < class BidirectionalIterator, class Compare >

bool

next_permutation( BidirectionalIterator first,

BidirectionalIterator last, class Compare );

next_permutation() , [first,last), , , ( , , 12.5). , false,   true. ,   comp. next_permutation() , . musil, ilmsu, .

#include <algorithm>

#include <vector>

#include <iostream.h>

void print_char( char elem ) { cout << elem ; }

void (*ppc)( char ) = print_char;

 

/* :

ilmsu ilmus ilsmu ilsum ilums ilusm imlsu imlus

imslu imsul imuls imusl islmu islum ismlu ismul

isulm isuml iulms iulsm iumls iumsl iuslm iusml

limsu limus lismu lisum liums liusm lmisu lmius

lmsiu lmsui lmuis lmusi lsimu lsium lsmiu lsmui

lsuim lsumi luims luism lumis lumsi lusim lusmi

milsu milus mislu misul miuls miusl mlisu mlius

mlsiu mlsui mluis mlusi msilu msiul msliu mslui

msuil msuli muils muisl mulis mulsi musil musli

silmu silum simlu simul siulm siuml slimu slium

slmiu slmui sluim slumi smilu smiul smliu smlui




- -  - -  - -