var domain="www.zuidaima.com";
var author="zuidaima";
var map=eval("["+Array(23).join("0x801,")+"0xfff]");
var tatris=[[0x6600],[0x2222,0xf00],[0xc600,0x2640],[0x6c00,0x4620],[0x4460,0x2e0,0x6220,0...
分类:
编程语言 时间:
2014-06-09 23:07:24
阅读次数:
348
翻译自官方文档Tentative NumPy Tutorial,有删节。
基本操作
基本的算术运算符都可以应用于数组类型,结果为对应元素之间的运,返回值为一个新的数组。
>>> a = array( [20,30,40,50] )
>>> b = arange( 4 )
>>> b
array([0, 1, 2, 3])
>>> c = a-b
>>> c
array([20,...
分类:
其他好文 时间:
2014-06-08 09:11:14
阅读次数:
222
其实这题一看知道应该是DP,再一看数据范围肯定就是单调队列了。不过我还不太懂神马单调队列、斜率优化……附上天牛的题解:http://www.cnblogs.com/neverforget/archive/2012/04/19/2456483.html
1 var f,g:array[0..10000...
Suppose a sorted array is rotated at some pivot
unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are
given a target value t...
分类:
其他好文 时间:
2014-06-08 02:05:43
阅读次数:
311
Follow up for "Search in Rotated Sorted
Array":What ifduplicatesare allowed?Would this affect the run-time complexity?
How and why?Write a function to...
分类:
其他好文 时间:
2014-06-08 01:19:29
阅读次数:
320
Single NumberGiven an array of integers, every
element appearstwiceexcept for one. Find that single one.Note:Your algorithm
should have a linear runti...
分类:
其他好文 时间:
2014-06-07 23:44:39
阅读次数:
302
"; return array_merge($left, array($key),
$right);}$array = array(29,21,3,234,57,76,6,74);$result =
Qsort($array);print_r($result);?>
分类:
Web程序 时间:
2014-06-07 21:26:05
阅读次数:
186
/** * 获得连续子数组的最大和 * * @author dfeng * */ private
static long getMax(long a, long b) { return a > b ? a : b; } /** *
获得连续子数组的最大和 * * @param array ...
分类:
其他好文 时间:
2014-06-07 21:21:30
阅读次数:
241
$array[$j+1]){ //升序排列 $temp = $array[$j];
$array[$j]=$array[$j+1]; $array[$j+1]=$temp; } ...
分类:
Web程序 时间:
2014-06-07 21:02:35
阅读次数:
343
$val){ $high = $mid -1; }else { $low = $mid+1; } }
return "not found";}$array = array(1,2,3,34,534,754,823,9...
分类:
Web程序 时间:
2014-06-07 20:59:25
阅读次数:
340