天天看点

Brute Force & STL --- UVA 146 ID Codes  Problem's Link:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=3&problem=82&mosmsg=Submission+received+with+ID+14418598

 Mean: 

 求出可重排列的下一个排列。

analyse:

 直接用STL来实现就可。自己手动写了一个,并不复杂。

Time complexity: O(n^2)

Source code: 

 1.STL

2.手写

  

继续阅读