卡特兰数的一个变形而已。一个经典的习题变过来的:n+m个人排队买票,并且满足,票价为50元,其中n个人各手持一张50元钞票,m个人各手持一张100元钞票,除此之外大家身上没有任何其他的钱币,并且初始时候售票窗口没有钱,问有多少种排队的情况数能够让大家都买到票。此时答案是:反过来考虑就是,把右括号看成...
分类:
其他好文 时间:
2015-03-08 21:22:36
阅读次数:
202
Remove Duplicates from Sorted Array II问题:Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array ...
分类:
其他好文 时间:
2015-03-08 21:19:36
阅读次数:
132
Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A...
分类:
其他好文 时间:
2015-03-08 21:21:32
阅读次数:
136
Linked List Cycle II问题:Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it withou...
分类:
其他好文 时间:
2015-03-08 21:21:21
阅读次数:
159
第二章 死定了 一个人如果延误了项目,那么他死定了! “约翰死定了,在下个版本出来前,他得连干五百个钟头······凯蒂死定了。她得感到天荒地老。布莱恩越发要完蛋。而且他只有一半的时间了。至于安迪吗,只有安迪没事。他的工作列表上没有成百上千的任务。”书中这样写道。 建造之前,要先有蓝图。你所需的时间...
分类:
其他好文 时间:
2015-03-08 21:19:47
阅读次数:
145
Dsecriptionn participants of «crazy tea party» sit around the table. Each minute one pair of neighbors can change their places. Find the minimum time ...
分类:
其他好文 时间:
2015-03-08 21:19:43
阅读次数:
199
标题:Add Two Numbers通过率:22.6%难度:中等You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each ...
分类:
其他好文 时间:
2015-03-08 21:19:22
阅读次数:
123
1 vector G[MAXN]; 2 int pre[MAXN], lowlink[MAXN], sccno[MAXN], dfs_clock, scc_cnt; 3 stack S; 4 void Tarjan(int u) 5 { 6 pre[u] = lowlink[u] = ++...
分类:
其他好文 时间:
2015-03-08 21:20:10
阅读次数:
154
今天装了个centos2.6.4 然后装jdk,完了redis2.6.4装redis2.6.4折腾了老半天,缺了很多东西,连gcc都没有无语中……废话不多说,直接上过程1、报错一 没用gcc安装过程 yum install cpp yum install binutils yum install g...
分类:
其他好文 时间:
2015-03-08 21:18:39
阅读次数:
154
1.===> 进入bin目录下,双击startup.bat看是否报错。一般肯定会报。2.===> 右键我的电脑===>高级===>环境变量 新建一个 变量名为 JAVA_HOME 然后变量值是 你的JDK的bin目录的上一层。 再新建一个 变量名为CATALINA_HOME 变量值是你的Tomc.....
分类:
其他好文 时间:
2015-03-08 21:17:38
阅读次数:
147
atomikos几个坑:1.jta.properties:com.atomikos.icatch.output_dir=/datayes/atomikoscom.atomikos.icatch.log_base_dir=/datayes/atomikos若一个tomcat上有两个atomikos应用...
分类:
其他好文 时间:
2015-03-08 21:17:07
阅读次数:
236
模板详情地址?http://www.chinaopencart.cn/index.php?route=product/product&product_id=55 模板特性兼容浏览器IE8, IE9, IE10, IE11, Firefox, Safari, Opera, Chrome OpenCart版本OpenCart 1.5.6.x, OpenCar...
分类:
其他好文 时间:
2015-03-08 20:15:05
阅读次数:
142
一、类加载器
类加载器用于加载Java的字节代码到Java虚拟机中,同时将配置文件等放在classpath目录下。
类加载器读取Java字节码文件并转换成Java.lang.Class类的一个实例,通过该实例的newInstance()方法可以创建该类对象(相当于调用空参数的构造方法)。基本上所有的类加载器都是 java.lang.ClassLoader类的一个实例。
ClassLoader...
分类:
其他好文 时间:
2015-03-08 20:14:33
阅读次数:
338
阈值处理的补充方案...
分类:
其他好文 时间:
2015-03-08 20:15:58
阅读次数:
169
题目:确定比赛名次Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 337 Accepted Submission(s): 180 Problem Description有N个比赛队(1 Input输入有若干组,每组中的第一行为二个数N(1 Out...
分类:
其他好文 时间:
2015-03-08 20:15:40
阅读次数:
152
U8Server是采用J2EE框架SSH2实现的。当然你也可以采用任何其他你熟悉的语言实现。上一篇文章中,我们从类的抽象中,大致梳理了一下U8Server所要完成的工作。大的方向上,U8Server需要实现统一的用户登录认证,和支付中心两大功能。更深入的细节,U8Server需要完成以下功能:
游戏管理:查询游戏,创建游戏(同时生成游戏的唯一appID,appKey等),编辑游戏,删除游...
分类:
其他好文 时间:
2015-03-08 20:15:09
阅读次数:
706
官方有题解,基本思路就是官方题解那样了
http://bestcoder.hdu.edu.cn/
B题用set+读入挂是可以卡时间过的,不过还是用HASH效率会比较高
代码:
A:
#include
#include
#include
using namespace std;
struct C {
int a, b, id;
void read() {
...
分类:
其他好文 时间:
2015-03-08 20:13:40
阅读次数:
249