摘要:
题目链接:https://vjudge.net/problem/UVA-725 思路:其实就是暴力枚举,但是枚举的时候可以采取些策略减少枚举次数。 因为我们以及知道了 n 和 a,那么我们就可以推出 b ,所以其实我们需要枚举的就是 a ,a 的范围就是[1234,98765] 这题比较烦的就是对前 阅读全文
posted @ 2019-12-05 21:10
_Ackerman
阅读(475)
评论(0)
推荐(0)
摘要:
next_permutation就是按照字典序排列得到所有的排列组合! 例如 我们需要输出{ 1 , 2 , 3 , 4 } 的全排列(调用STL) 1 #include<iostream> 2 #include<algorithm> 3 using namespace std; 4 int mai 阅读全文
posted @ 2019-12-05 21:07
_Ackerman
阅读(1215)
评论(0)
推荐(2)

浙公网安备 33010602011771号