题目Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactl...
分类:
其他好文 时间:
2015-08-07 19:58:54
阅读次数:
72
Problem DescriptionGive you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbe...
分类:
其他好文 时间:
2015-08-07 19:25:02
阅读次数:
111
使用simple_html_dom.php,下载|文档 因为抓取的只是一个网页,所以比较简单,整个网站的下次再研究,可能用Python来做爬虫会好些。 1 2 find('.txt-list li a') as $element) 9 $arr[]= $element->innert...
分类:
Web程序 时间:
2015-08-07 18:58:14
阅读次数:
184
-mtime:指定时间文件内容被修改过-ctime:指定时间文件权限被修改过-atime:指定时间文件被读取过删除60天前的文件find/var/log-name"log*.gz"-mtime+60-execrm-rf{}\;#查找指定范围的删除find./{a,b}-typef-name"*2.txt"|xargsrm-rf{}\;#cp查找的文件find./-typef-name"*2.txt"|..
分类:
其他好文 时间:
2015-08-07 16:22:43
阅读次数:
124
1. 查找30分钟内最新修改过的文件
find ./ -mmin -30 -type f | head -1
2. 查找30分钟内最早修改过的文件
find ./ -mmin -30 -type f |
tail -1
3. 查找24小时内最新修改过的文件
find ./ -mtime 0 -type f | head -1
4. 查找48小时~24小...
分类:
系统相关 时间:
2015-08-07 14:42:12
阅读次数:
465
.not()----------.hasClass() has()
一个div同时有select selected属性:
$(parentDiv).find('.select').not('.selected').css("background",'#333');
$(parentDiv).find('.select').hasClass('selected').css("backgroun...
分类:
Web程序 时间:
2015-08-07 13:24:17
阅读次数:
116
题目要求对给定的科学计数法进行解析,并且输出传统计数法表示的数字,要求正数不带正号,小数保留原来的后缀0个数。
这个题的关键是结合string的find、substr方法查找和截取,使用stringstream来转换字符串到数字。
此类问题最主要的是抓住分类讨论的要点,处理尽可能少的情况。...
分类:
其他好文 时间:
2015-08-07 13:21:56
阅读次数:
136
直接套算法就好#include #include using namespace std;int fa[1005];int Find(int x){ return fa[x]==x?x:fa[x]=Find(fa[x]);}bool Merge(int u,int v){ int fu=...
分类:
其他好文 时间:
2015-08-07 13:15:30
阅读次数:
98
Given an array of integers and an integerk, find out whether there there are two distinct indicesiandjin the array such thatnums[i] = nums[j]and the d...
分类:
其他好文 时间:
2015-08-07 12:59:08
阅读次数:
97
Secret agent Maria was sent to Algorithms City to carry out an especially dangerous mission. After
several thrilling events we find her in the first station of Algorithms City Metro, examining the ti...
分类:
其他好文 时间:
2015-08-07 11:16:34
阅读次数:
130