03 2014 档案

code project 上的内存管理的示例代码
摘要:/******************************************************************** created: 2014/03/17 18:53 filename: main.cpp author: Justme0 (http://blog.csdn.net/justme0) purpose: code project 内存管理*********************************************************************/#define _CRT_S... 阅读全文

posted @ 2014-03-17 19:20 jjtx 阅读(423) 评论(0) 推荐(0)

Pow 算法
摘要:#include using namespace std;templateT Pow(T x, Int n){ T r(1); // 应是含幺半群的幺元 while (n != 0) { if (n & 0x1 == 1) { r *= x; } n >>= 1; x *= x; } return r;}template T PowBoost(T x, Int n){ T r(n & 0x1 ? x : 1); while ((n >>= 1) != 0)... 阅读全文

posted @ 2014-03-17 19:19 jjtx 阅读(694) 评论(0) 推荐(0)

C++ 中数串互转、进制转换的类
摘要:1 /******************************************************************** 2 created: 2014/03/16 22:56 3 filename: main.cpp 4 author: Justme0 (http://blog.csdn.net/justme0) 5 6 purpose: C++ 中数串互转、进制转换的类 7 *********************************************************************/ 8 9 #def... 阅读全文

posted @ 2014-03-17 19:13 jjtx 阅读(337) 评论(0) 推荐(0)

gcd 最小公约数
摘要:1 int gcd(int a, int b) {2 return b == 0 ? a : gcd(b, a % b);3 } 阅读全文

posted @ 2014-03-15 16:52 jjtx 阅读(186) 评论(0) 推荐(0)

导航