Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. You m...
分类:
其他好文 时间:
2014-07-24 21:36:52
阅读次数:
172
$(function(){ var $box=$("#box"); var $img=$box.find("img"); var imgWidth=$img.eq(0).width(); var exposeWidth=160; var boxWidth=imgWidth+exposeWidth*(...
分类:
Web程序 时间:
2014-07-24 21:25:29
阅读次数:
225
Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen...
分类:
其他好文 时间:
2014-07-24 21:24:16
阅读次数:
296
1.man -t ls | ps2pdf -> ls.pdf生成pdf格式的ls帮助文件。
2. pushd . :将当前目录压入栈,使用popd可以回到该目录。
3.find -type f ! -perm -444:寻找所有不可读的文件(对网站有用)
4.find -type d ! -perm -111 寻找不可访问的目录(对网站有用)...
分类:
系统相关 时间:
2014-07-24 17:46:36
阅读次数:
266
刘汝佳书上用的是set,
通过集合来查找.count()和删除.erase().这个方法比我的要好,用时更短。
我觉得map也能完成这个任务,但是其删除并不方便,需要先查找find()下标,然后删除此下标对应的元素
但是map有map的用法,下面的方法就是比较容易实现的一种方法。
我本想着这个一边读完就计算出了ans,应该更快一点的,但是事实上还不如先读再用set处理来得快。
#incl...
分类:
其他好文 时间:
2014-07-24 17:36:36
阅读次数:
227
未格式化打印>db.games.find()
{"_id":ObjectId("53d077372826c5d3aae7ad6a"),"game":"pinball","user":"joe","score":5050}格式化打印>db.games.find().pretty()
{
"_id":ObjectId("53d077372826c5d3aae7ad6a"),
"game":"pinball",
"user":"joe",
"score":5050
}
>修..
分类:
数据库 时间:
2014-07-24 12:28:55
阅读次数:
296
Problem Description
In the year 8888, the Earth is ruled by the PPF Empire . As the population growing , PPF needs to find more land for the newborns . Finally , PPF decides to attack Kscinow w...
分类:
其他好文 时间:
2014-07-24 12:25:06
阅读次数:
219
my code:#include #include #includeusing namespace std;int find(int num,int A []){while(num!=A[num])//{ num = A[num];return num;}//bool follow(int a...
分类:
其他好文 时间:
2014-07-24 12:16:25
阅读次数:
175
Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest...
分类:
其他好文 时间:
2014-07-24 12:11:55
阅读次数:
253
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 as many transactions as you like (ie, buy on...
分类:
编程语言 时间:
2014-07-24 10:25:36
阅读次数:
227