张再筵的博客

为什么要担心?如果努力了,担心不会让结果变得更好。----《迪士尼》

 1.DFS(使用递归与回溯实现) 对于普通数组Array,这里给出函数模板形式: #include<bits/stdc++.h> using namespace std; template<class T> void func(T* arr, int total, int k = 0) //轮流更换第n位和n到total-1...

发布 0 条评论

C++的标准库中提供了一些实用的函数,比如: __gcd(x,y)函数 用于求x,y的最大公约数 其中x,y不能是浮点数 头文件:#include<algorithm>; 用法: #include<iostream> #include<algorithm> using namespace std; in...

发布 0 条评论