摘要: ![](https://images2018.cnblogs.com/blog/891120/201803/891120-20180319092059948-33487099.png) ![](https://images2018.cnblogs.com/blog/891120/201803/891120-20180319092114287-1477501860.png) ![](https:... 阅读全文
posted @ 2018-03-19 09:21 799 阅读(113) 评论(0) 推荐(0) 编辑
摘要: include using namespace std; mapmp1; map::iterator it1; mapmp2; map::iterator it2; typedef struct Node { char data; int freq; struct Node lchild, rchi 阅读全文
posted @ 2018-02-28 09:51 799 阅读(266) 评论(0) 推荐(0) 编辑
摘要: ifndef _HTEST_H define TEST(a,b)\ void test _ a _ b();\ int p _ a _ b = haiaei_test_run(test _ a _ b, a, b);\ void test _ a _ b() int haizei_test_run( 阅读全文
posted @ 2017-12-09 14:40 799 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1.打印上三角矩形 include using namespace std; int main() { int n = (1e10 1)/9; for (int i=0; i using namespace std; int main() { int n =1e9; for (int i=0; i 阅读全文
posted @ 2017-11-18 19:26 799 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 题意:计算0 9的第1000000大的字典序 注意: 标记的数组位置和具体的值恰好相反 求第n个状态则需要转换n 1次 阅读全文
posted @ 2017-11-17 00:48 799 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 记录这些年我写过的bug 2017/11/16 1.数组溢出 2.for (int j = a[0]; j = 1; j++ ) 2017/11/17 1.辛辛苦苦写的函数,自己忘了调用 2.逻辑错误 阅读全文
posted @ 2017-11-16 20:27 799 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 1.大整数加法 题意:计算两个数得和 2.大整数乘法 题意:计算2 ^1000 各位数字累加和 include using namespace std; const int N = 1e5 + 5; const int VAL = 1000; int32_t main() { char a[N],b 阅读全文
posted @ 2017-11-16 20:10 799 阅读(326) 评论(0) 推荐(0) 编辑
摘要: 题意:求解因子个数大于500的三角数 方法一: 约数个数定理: 时间复杂度:O(N^3) 方法二: 要点1:线性筛的应用——用24 和 2 标记48的约数个数 48 = 2^4 3^1 num[48] = (4+1) 2=10 24 = 2^3 3^1 num[24] =(3+1) 2= 8 模拟: 阅读全文
posted @ 2017-11-13 01:33 799 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 代码段1:计算约数定理中素数的幂数 分析:第19行代码:保证prime[j] 阅读全文
posted @ 2017-11-12 21:04 799 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 记忆化:就是将中间的运算结果保存起来,避免多次计算 阅读全文
posted @ 2017-11-12 15:31 799 阅读(150) 评论(0) 推荐(0) 编辑