码迷,mamicode.com
首页 > 2015年03月30日 > 全部分享
effective c++ 笔记 (4)
//---------------------------15/03/29---------------------------- //#9    绝不在构造和析构过程中调头virtual函数 {     /*         1:在构造时调用virtual函数有两个结果             1>如果基类实现了这个函数,就调用基类的函数。       ...
分类:编程语言   时间:2015-03-30 09:26:04    阅读次数:178
[LeetCode 134] Gas Station
题目链接:gas-station /** * There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it costs cost[i] of ...
分类:其他好文   时间:2015-03-30 09:25:15    阅读次数:163
POJ_2503_Babelfish(map or 字典树)
Babelfish Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 34816   Accepted: 14908 Description You have just moved from Waterloo to a big city. The people here ...
分类:其他好文   时间:2015-03-30 09:23:04    阅读次数:169
windows中用Virtual Box虚拟机安装ubuntu的一些问题
安装的时候经常会遇到  0x00000025地址不能read的情况,刚开始还以为是.iso镜像没有安装成功,不能读取安装后的系统,反复安装了好多次,花了一天的时间和精力,才把这个问题搞明白,竟然是因为设置中的显示栏里的启用3D加速导致的不能read。真是血的教训。还发现了在存储中的虚拟光驱中添加addvirtualguest.iso和ubuntu.iso镜像后,如果设置了固态驱态这一项,应该就是说...
分类:Windows程序   时间:2015-03-30 09:23:53    阅读次数:149
杭电 HDU 1194 Beat the Spread!
Beat the Spread! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5192    Accepted Submission(s): 2705 Problem Description Superbowl Sun...
分类:其他好文   时间:2015-03-30 09:22:36    阅读次数:132
杭电 HDU 1196 Lowest Bit
Lowest Bit Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9052    Accepted Submission(s): 6656 Problem Description Given an positive i...
分类:其他好文   时间:2015-03-30 09:23:04    阅读次数:125
例题6-8 树 UVa548
1.题目描述:点击打开链接 2.解题思路:本题给出了一颗二叉树的中序遍历和后序遍历,要求找一个叶子,使得它到达根结点的权和最小,如果有多解,那么该叶子自身的权应该尽量小。首先,根据中序遍历和后序遍历建立二叉树,这道题采用数组来存放左右子树的结点值,根为root的左子树结点为lch[root]右子树结点为rch[root]。 那么,如何根据中序遍历,后序遍历来建树呢?方法是根据后序遍历找到根,然...
分类:其他好文   时间:2015-03-30 09:24:43    阅读次数:145
JAVA学习笔记(四十一)-多线程与线程组
线程组ThreadGroup/* * 线程组ThreadGroup * * 结论: * 如果在设置线程组优先级之前设置线程优先级,则线程优先级不受线程组优先级限制 * 如果在设置线程组优先级之后设置线程优先级,则线程优先级不能超过线程组优先级 * * 线程的优先级,默认与启动它的父线程相同,但受到所有线程组的限制 */ public class Test02 { publ...
分类:编程语言   时间:2015-03-30 09:22:32    阅读次数:224
JAVA学习笔记(四十二)-生产者消费者模型
wait()、notify()/* * wait()、notify() * * 1.两个方法都只能在synchronized代码块中执行,因为要对持有锁的线程操作,只有同步中才有锁 * 2.两个方法在操作同步中的线程时,必须要标识所操作线程持有的对象锁 * 3.等待和唤醒必须是同一个对象锁 */ public class Test05 { public static void...
分类:编程语言   时间:2015-03-30 09:21:54    阅读次数:208
JAVA学习笔记(四十三)- ThreadLocal
死锁/* * 死锁:多个线程使用不同的锁,每个线程都需要另一个线程持有的锁 * 出现:同步的嵌套 * */ public class Test01 { public static void main(String[] args) { Tom tom = new Tom(); Alice alice = new Alice(); MyT...
分类:编程语言   时间:2015-03-30 09:22:27    阅读次数:212
Sicily 1405. Mahershalalhashbaz, Nebuchadnezzar, and Billy Bob Benjamin Go to the Regionals
1405. Mahershalalhashbaz, Nebuchadnezzar, and Billy Bob Benjamin Go to the Regionals Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description The Association for Computing Mac...
分类:其他好文   时间:2015-03-30 09:22:29    阅读次数:151
Sicily 1459. The Dragon of Loowater
1459. The Dragon of Loowater Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem. ...
分类:其他好文   时间:2015-03-30 09:21:28    阅读次数:137
杭电 HDU 1197 Specialized Four-Digit Numbers
Specialized Four-Digit Numbers Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4603    Accepted Submission(s): 3344 Problem Description ...
分类:其他好文   时间:2015-03-30 09:21:39    阅读次数:98
Sicily 1484. 守望者的逃离
1484. 守望者的逃离 Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description    恶魔猎手尤迪安野心勃勃,他背叛了暗夜精灵,率领深藏在海底的娜迦族企图叛变。守望者在与尤迪安的交锋中遭遇了围杀,被困在一个荒芜的大岛上。为了杀死守望者,尤迪安开始对这个荒岛施咒,这座岛很快就会沉下去。到那时,岛上的...
分类:其他好文   时间:2015-03-30 09:21:36    阅读次数:181
Sicily 1234. Playground
1234. Playground Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description George has K <= 20 steel wires shaped in the form of half-circles, with radii a1, a2, . . . , aK. The...
分类:其他好文   时间:2015-03-30 09:21:07    阅读次数:195
Sicily 9456. Clumsy Cows
9456. Clumsy Cows Constraints Time Limit: 1 secs, Memory Limit: 256 MB Description Bessie the cow is trying to type a balanced string of parentheses into her new laptop, but she is s...
分类:其他好文   时间:2015-03-30 09:22:36    阅读次数:179
Sicily 1426. Phone List
1426. Phone List Constraints Time Limit: 1 secs, Memory Limit: 64 MB Description Given a list of phone numbers, determine if it is consistent in the sense that no number is the pre?x...
分类:其他好文   时间:2015-03-30 09:21:57    阅读次数:182
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!