码迷,mamicode.com
首页 >  
搜索关键字:顶层 const    ( 27917个结果
cout输出字符串指针
先给出通过字符型指针输出字符串的示例代码,如下:#include using std::cout;using std::endl; int main(){ const char *pszStr = "this is a string"; // 输出字符串 cout int ma...
分类:其他好文   时间:2014-05-14 01:33:08    阅读次数:247
POJ 2478 Farey Sequence 筛选法求欧拉函数
题目来源:POJ 2478 Farey Sequence 题意:输入n 求 phi(2)+phi(3)+phi(4)+...+phi(n) 思路:用类似筛法的方式计算phi(1), phi(2), ..., phi(n) 再求前缀和 #include #include #include //欧拉phi函数 const int maxn = 1000010; typedef long...
分类:其他好文   时间:2014-05-14 01:05:22    阅读次数:323
LoadRunner函数示例:lr_paramarr_random()
lr_paramarr_random()函数的作用为:从一个参数数组中随机抽取一个值并以字符串形式返回。其使用方式及返回方式如下:char * lr_paramarr_random( const char * paramArrayName);该函数在某些测试场景下或许比较有用,如随机选择页面中一.....
分类:其他好文   时间:2014-05-13 22:55:18    阅读次数:505
poj 1423 Big Number
1 /** 2 斯特林(Stirling)公式: 3 4 求 n! 的位数 5 6 ceil函数的作用是求不小于给定实数的最小整数。 7 **/ 8 #include 9 #include 10 #include 11 using namespace std;12 const doubl...
分类:其他好文   时间:2014-05-13 22:06:51    阅读次数:253
二分查找
二分查找的一点思考二分查找算法实现#define LOCAL#include#include#includeint const MAX_N=21) { int mid=(ub+lb)/2; if(a[mid]>=k) { ub=m...
分类:其他好文   时间:2014-05-13 21:53:37    阅读次数:328
poj 3608 Bridge Across Islands 两凸包间最近距离
1 /** 2 旋转卡壳,, 3 **/ 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 const double eps = 1e-8; 11 struct point {...
分类:其他好文   时间:2014-05-13 21:35:05    阅读次数:374
poj 3335 /poj 3130/ poj 1474 半平面交 判断核是否存在 / poj1279 半平面交 求核的面积
1 /*************** 2 poj 3335 点序顺时针 3 ***************/ 4 #include 5 #include 6 #include 7 using namespace std; 8 const double eps = 1e-8;...
分类:其他好文   时间:2014-05-13 21:33:59    阅读次数:413
unix环境编程 目录操作
1、目录操作有 mkdir(constchar *pathname,mode_t mode) 创建目录,成功则返回0,若出错则返回-1 int rmdir(const char *pathname) rmdir可以删除一个空目录,成功则返回0,若出错返回-1 DIR *opendir(const *pathname) 成功则返回指针,若出错则返回NULL...
分类:其他好文   时间:2014-05-13 08:06:02    阅读次数:298
HDU 4022 Bombing STL 模拟题
手动模拟。。 #include #include #include #include #include #include #include #include using namespace std; #define N 10100 #define inf 1000000010 mapx,y; struct X{ int x,y; bool operator<(const X&a)const{...
分类:其他好文   时间:2014-05-13 07:29:10    阅读次数:294
黑马程序员——集合基础知识(Collection)
集合基础知识数组:长度固定,可存基本数据和对象。集合:只能放对象,不固定。容器也有共性,不断抽取成一个体系,集合框架。参阅顶层创建底层。顶层是collection。collection里有两个常见的接口,List和Set。常见集合有Arraylist,linkedlist,vector,hashSetTreeSet.为什么..
分类:其他好文   时间:2014-05-13 03:35:07    阅读次数:371
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!