建设工程合同法,谷歌seo怎么优化,物流信息网站,建设网站你认为需要注意例题 洛谷P1088 在c的函数库algorithm里有几个关于排列的函数 下一个全排列next_permutation next_permutation(num,numn)函数是求数组num中的前n个元素的下一个全排列#xff0c;同时并改变num数组的值。 上一个全排列prev_permutation#xff08;同理如上#xff09; ac代…例题 洛谷P1088 在c的函数库algorithm里有几个关于排列的函数 下一个全排列next_permutation next_permutation(num,numn)函数是求数组num中的前n个元素的下一个全排列同时并改变num数组的值。 上一个全排列prev_permutation同理如上 ac代码 #include iostream
#includealgorithm
using namespace std;
int main()
{int N,M,flag,i;int finger[10001];cinNM;for(i0;iN;i)cinfinger[i];for(i1;iM;i)next_permutation(finger,fingerN);for(i0;iN;i)coutfinger[i] ;return 0;
} 转载于:https://www.cnblogs.com/zlhdbk/p/10596727.html