码迷,mamicode.com
首页 >  
搜索关键字:time    ( 52982个结果
C++调用函数模仿数字钟表
调用系统函数,可以得到系统时间 1 #include 2 #include 3 #include 4 using namespace std; 5 int main() 6 { 7 time_t rawtime; 8 9 while(true){10 time(&...
分类:编程语言   时间:2015-01-06 19:39:54    阅读次数:184
[LeetCode]122 Best Time to Buy and Sell Stock II
https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/http://blog.csdn.net/linhuanmars/article/details/23164149publicclassSolution{ publicintmaxProfit(int[]prices){ //Ifasmanytransactions //Gready intpro=0; intbuy=0; booleanhold=false; int..
分类:其他好文   时间:2015-01-06 18:13:23    阅读次数:132
[LeetCode]121 Best Time to Buy and Sell Stock
https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock/http://blog.csdn.net/linhuanmars/article/details/23162793publicclassSolution{ publicintmaxProfit(int[]prices) { //SolutionA: returnmaxProfit_DP(prices); //SolutionB: //returnmaxProfit_Binary(..
分类:其他好文   时间:2015-01-06 18:11:55    阅读次数:176
Python学习笔记_字典(Dict)_遍历_不同方法_性能测试对比
今天专门把python的字典各种方法对比测试了一下性能效果.测试代码如下: 1 def dict_traverse(): 2 from time import clock 3 my_dict = {'name': 'Jim', 'age': '20', 'height': '180c...
分类:编程语言   时间:2015-01-06 17:48:14    阅读次数:180
多媒体开发之rtp 打包发流---同网段其他机子sdp 播放不了
(1)(2)(3)-------------author:pkf------------------time:2015-1-6后面发现是connection 的server 地址是指定的 导致播放不了,然后用wireshark capture了一下一大堆udp的数据出来了,也不是端口问题,和rtsp...
分类:其他好文   时间:2015-01-06 17:18:12    阅读次数:156
Best Time to Buy and Sell Stock III
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 complete at most two transactions. Note: You may ...
分类:其他好文   时间:2015-01-06 15:41:54    阅读次数:189
leetcode 157: Read N Characters Given Read4
Read N Characters Given Read4 Total Accepted: 960 Total Submissions: 3775 The API: int read4(char *buf) reads 4 characters at a time from a file. The return value is the actual number of char...
分类:其他好文   时间:2015-01-06 15:38:42    阅读次数:222
__FILE__ __LINE__ __DATE__ __TIME__宏
项目中总是看到__FILE__ __LINE__的玩意,想起来曾经在Linux内核源码中也看到过类似的东西。抽时间查了查这玩意是什么。 简单而言。是ANSI C预定义的宏。有这么几个,注意前后都是两个下划线 __FILE__ :表示源文件名称(不是可执行文件),字符串类型 __LINE__:源码行数,整形 __DATE__:编译日期,字符串 __TIME__:编译时间,字符串 ...
分类:其他好文   时间:2015-01-06 15:36:55    阅读次数:172
ctime、atime
Linux系统文件有三个主要的时间属性,分别是ctime(change time, 而不是create time), atime(access time), mtime(modify time)。后来为了解决atime的性能问题,还引入了一个relatime的属性,下面一一解释。 ctime, 很多...
分类:其他好文   时间:2015-01-06 15:24:49    阅读次数:116
HDU 1269 迷宫城堡(强连通图的判定)
最近《算法导论》快看完图论部分了,很多有关图的算法都彻底搞懂并加以证明了。现在主要是将理解的思想用到题目中来加强下。这个题目主要是判断一下整个图是否是强连通的,很简单,可以用tarjan也可以用kosaraju。因为不要求找出所有的强连通分量,所以这里只是借用了kosaraju的思想,然后本题的解答简化的异常简单。 迷宫城堡 Time Limit: 2000/1000 MS (...
分类:其他好文   时间:2015-01-06 13:53:12    阅读次数:142
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!