码迷,mamicode.com
首页 > 其他好文
Leetcode-3Sum
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of ...
分类:其他好文   时间:2014-11-28 06:18:21    阅读次数:164
点击Button2后,执行MouseDown的过程
Form1上放两个按钮Button1和Button2,默认输入焦点是Button1,现在点击Button2,产生WM_LBUTTONDOWN消息procedure TForm1.Button2MouseDown(Sender: TObject; Button: TMouseButton; Shift...
分类:其他好文   时间:2014-11-28 06:18:45    阅读次数:204
hdu 1251 统计难题 (Trie树)
本题是trie树模板题,如果不用trie而用map写可以看出trie处理这类问题有明显的时间优势。在trie树中查找一个关键字的时间和树中包含的结点数无关,而取决于组成关键字的字符数。(对比:二叉查找树的查找时间和树中的结点数有关O(log2n)。)如果要查找的关键字可以分解成字符序列且不是很长,利...
分类:其他好文   时间:2014-11-28 06:17:45    阅读次数:189
Leetcode-Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo...
分类:其他好文   时间:2014-11-28 06:15:44    阅读次数:173
Sharepoint学习笔记—习题系列--70-576习题解析 --索引目录
Sharepoint学习笔记—习题系列--70-576习题解析 --索引目录
分类:其他好文   时间:2014-11-28 06:17:06    阅读次数:201
Leetcode-Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:其他好文   时间:2014-11-28 06:15:51    阅读次数:215
HDU 3467 (求五个圆相交面积) Song of the Siren
还没开始写题解我就已经内牛满面了,从晚饭搞到现在,WA得我都快哭了呢题意:在DotA中,你现在1V5,但是你的英雄有一个半径为r的眩晕技能,已知敌方五个英雄的坐标,问能否将该技能投放到一个合适的位置,使得对面所有敌人都被眩晕,这样你就有机会能够逃脱。分析:对于敌方一个英雄来说,如果技能的投放位置距离...
分类:其他好文   时间:2014-11-28 06:16:13    阅读次数:321
hdu 5072 计数+容斥原理
/*题意: 给出n个数(n#include #include using namespace std;typedef __int64 LL;const int maxn=1000;int prime[maxn],flag[maxn],num;int numc[maxn*100+5],f[maxn*1...
分类:其他好文   时间:2014-11-28 06:16:09    阅读次数:167
classic example1
1 2 3 7 8 9 END 10 ."the list item".""; 11 12 echo $html; 13 14 15 16 结果: the list item 17 18 19 20 //2.用strpos()来查找字符串,strpos...
分类:其他好文   时间:2014-11-28 06:14:09    阅读次数:204
Arcgis server - ' packaging failed '
我在使用ARCCatalog发布地图服务时,报这个错:packaging failed 然后我从头试,发现它提示说我的目录'C:\Users\Administrator\AppData\Local\ESRI\Desktop10.1\Staging\arcgis on localhost_608...
分类:其他好文   时间:2014-11-28 06:15:16    阅读次数:797
classic example2
function kg(){echo "";}//9.将字母转换成大小写echo ucfirst("how do you do today?"); //字符串首字母大写,只能是第一个字母,第一个不是字母就不行kg();echo ucwords("the prince of wales"); //所有...
分类:其他好文   时间:2014-11-28 06:15:27    阅读次数:253
【HDOJ】1406 Ferry Loading III
模拟,注意需要比较队头与当前时间的大小关系。 1 #include 2 #include 3 #include 4 5 #define MAXN 10005 6 #define INF 0xffffff 7 8 typedef struct { 9 int i, t;10 } no...
分类:其他好文   时间:2014-11-28 06:15:12    阅读次数:206
约瑟夫环问题
1) {if ($i % $m != 0) {$arr[] = $arr[$i-1]; //判断区//print_r($arr);}unset($arr[$i-1]);$i++;}return $arr;}echo '';$arr = pickKing(3, 3);print_r($arr);ec....
分类:其他好文   时间:2014-11-28 06:14:45    阅读次数:149
斐波那契函数.
";//普通版function fib2($n){if($n==1||$n==2){return 1;}else{return fib2($n-1)+fib2($n-2);}}echo fib2(10);?>
分类:其他好文   时间:2014-11-28 06:12:33    阅读次数:197
转:iframe加载的子页面里面获取父级元素窗口以及元素的高度
iframe里的js要操作父级窗口的dom,必须搞懂几个对象:parent是父窗口(如果窗口是顶级窗口,那么parent==self==top)top是最顶级父窗口(有的窗口中套了好几层frameset或者iframe)self是当前窗口(等价window)父级页面:index.html父窗口 .....
分类:其他好文   时间:2014-11-28 06:11:51    阅读次数:975
hdu 4445 Crazy Tank(物理过程枚举)
遇到物理题,千万不要一味的当成物理题去想着推出一个最终结果来,这样ACM竞赛成了物理比赛,出题人就没水平了。。。往往只需要基础的物理分析,然后还是用算法去解决问题。这题n小于等于200,一看就估计是暴力枚举能过。就枚举角度就行了。 1 #include 2 #include 3 #include 4...
分类:其他好文   时间:2014-11-28 06:13:20    阅读次数:148
在iframe子页面中获取并操作父级页面的对象/元素
//获取iframe的window对象// var gbiframe = window.top.document.getElementById("gbiframe").contentWindow;// 通过获取到的window对象操作HTML元素,这和普通页面一样// var val = gbifr...
分类:其他好文   时间:2014-11-28 06:10:51    阅读次数:173
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!