张再筵的博客

金钱是有史以来最普遍也是最有效的互信系统。----《人类简史:从动物到上帝》

一,指定格式输出 1.在C中,按指定进制格式输出如下, printf("%05o\n",35); //按八进制格式输出,保留5位高位补零 printf("%03d\n",35); //按十进制格式输出,保留3位高位补零 printf("%05x\n",...

发布 0 条评论

 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 条评论