码迷,mamicode.com
首页 >  
搜索关键字:php array 数组    ( 182180个结果)
LeetCode121:Best Time to Buy and Sell Stock
题目: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transac...
分类:其他好文   时间:2014-05-28 00:55:20    阅读次数:288
2014-05-26 总结
php 读写文件1、fopen: 打开文件函数 $fp = fopen("tmp.htm","r");2、fread: 读取文件内容 $str = fread($fp,filesize("tmp.htm"));3、filesize: 读取文件大小,字节为计量单位 $str = fread($fp,....
分类:其他好文   时间:2014-05-28 00:54:04    阅读次数:237
LeetCode122:Best Time to Buy and Sell Stock II
题目: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may co...
分类:其他好文   时间:2014-05-28 00:53:26    阅读次数:338
php中const定义常量
const 常量 1.在定义时必须被初始值,2.前面不加任何修饰符3.变量名字母一般都大写4.常量可以被子类继承5.一个常量是属于一个类的,而不是某个对象的作用:当某些值是固定不变的,就用const1.const 定义的常量和define()定义的常量的区别?希望一个成员变量不被修改 例如圆周率 3...
分类:Web程序   时间:2014-05-28 00:50:10    阅读次数:371
poj 1068
题意:给定p数组 让求w数组 p数组;S (((()()()))) P-sequence 4 5 6666//)括号 左边(括号的个数 W-sequence 1 1 1456//)括号所匹配的括号中的括号对数用一个栈来模拟#includeusing namespac...
分类:其他好文   时间:2014-05-28 00:46:16    阅读次数:187
PHP读取文件_2014.5.26的总结
1、PHP部分文件操作函数 (1) fopen 打开文件函数 fopen (路径和文件名,打开方式); (2) fread 读取文件内容 fread (打开的文件,结束位置); (3) filesize 读取文件大小,字节为计量单位 filesize (路径和文件...
分类:Web程序   时间:2014-05-28 00:45:32    阅读次数:305
PHP (20140526)
1、PHP部分文件操作函数 (1) fopen 打开文件函数 fopen (路径和文件名,打开方式);(2) fread 读取文件内容 fread (打开的文件,结束位置);(3) filesize 读取文件大小,字节为计量单位 filesize (路径和文件名);(4) fwrite 写入...
分类:Web程序   时间:2014-05-28 00:42:17    阅读次数:295
HDU-1565 方格取数(1)
http://acm.hdu.edu.cn/showproblem.php?pid=1565 方格取数(1)Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submissi....
分类:其他好文   时间:2014-05-28 00:31:16    阅读次数:248
hdu 3367 Pseudoforest
http://acm.hdu.edu.cn/showproblem.php?pid=3367 1 #include 2 #include 3 #include 4 #define maxn 20000 5 using namespace std; 6 7 int n,m; 8 int f[m...
分类:其他好文   时间:2014-05-28 00:03:30    阅读次数:451
20140525 冒泡
1、冒泡排序(自己写) #include#define swap(x,y) x=x+y; y=x-y; x=x-y;void maopao(int *a,int length) //每次把最大的元素冒泡到数组末尾,从小到大的顺序,length是数组长度,a是数组名,作为形参之后,数组名退化为指针{ ...
分类:其他好文   时间:2014-05-27 23:59:27    阅读次数:434
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!