大意:给一些箱子,每个箱子都有自己的强度,若为n,表示它上面最多能摞n个箱子。
问:最少能把这些箱子摞成几摞。
分析:从上往下摞,贪心。...
分类:
其他好文 时间:
2014-05-07 16:08:30
阅读次数:
286
box在堆栈中创建一个新的对象,性能消耗大int i = 123;// Boxing copies
the value of i into object o.object o = i; unboxing 1.检查对象实例
2.将该值从实例复制到值类型变量中int i = 123; // a valu...
分类:
其他好文 时间:
2014-05-07 14:17:52
阅读次数:
380
binary_search 这个函数的返回值是布尔型,也就是最简单的找到了就为真,没找到就是假。
传入参数有三个,数据集合的左端点,数据集合的右端点,查找的值。 注意这些左端点右端点是要求左开右闭原则的,就是和数学上的左开右闭区间[a,
b)一样,右端点是个不会被查阅的值。 一般来说写法类似: bo...
分类:
编程语言 时间:
2014-05-07 12:47:43
阅读次数:
436
1. 强制不换行,并且多行文字溢出显示省略号.ellips{white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;}.ellips_line2,.ellips_line3{display:-webkit-box;
-webkit-bo...
分类:
Web程序 时间:
2014-05-07 01:16:15
阅读次数:
421
第一届山东省赛题目(2400-2409)http://acm.sdibt.edu.cn/JudgeOnline/problemset.php?search=%E5%B1%B1%E4%B8%9C%E7%9C%81%E7%AC%AC%E4%B8%80%E5%B1%8AACM%E7%A8%8B%E5%BA...
分类:
其他好文 时间:
2014-05-07 00:07:25
阅读次数:
338
参考『http://stat-design.blogspot.sg/search?updated-min=2011-01-01T00:00:00-06:00&updated-max=2012-01-01T00:00:00-06:00&max-results=4』
We know that the Mean gives us the central tendency of the data, ...
分类:
其他好文 时间:
2014-05-06 23:10:08
阅读次数:
450
题目原文:
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?
For example,Given n = 3, there are a total of 5 unique BST's.
题目理解...
分类:
其他好文 时间:
2014-05-06 22:15:57
阅读次数:
415
请不要随便指点别人该怎么做、每个人的人生都应该自己掌握、你给不了别人一切、你也不懂别人的忧伤、
微笑不代表快乐、哭泣不一定悲伤
不努力怎么让关心你的人幸福、不努力怎么让看不起你的...
分类:
其他好文 时间:
2014-05-06 21:25:50
阅读次数:
279
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become 4
5 6 7 0 1 2).
You are given a target value to search. If found in the array retur...
分类:
其他好文 时间:
2014-05-06 19:03:11
阅读次数:
365
#header .nav-box { background:url(images/nav-box-bg.gif) left top repeat-x; width:100%;}
repeat-x是横向铺满,就是在#header .nav-box中,图片nav-box-bg.gif会横向重复,直到铺满;
repeat-y是纵向,就这么回事,如果不想重复,no-repeat....
分类:
Web程序 时间:
2014-05-06 15:39:30
阅读次数:
355