[leetcode]Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring....
                            
                            
                                分类:
其他好文   时间:
2014-10-02 13:30:42   
                                阅读次数:
217
                             
                    
                        
                            
                            
                                矩阵乘法...
                            
                            
                                分类:
其他好文   时间:
2014-10-02 13:30:32   
                                阅读次数:
182
                             
                    
                        
                            
                            
                                题目地址:HDU 2473
这题以前碰到过,没做出来。。现在又做了做,还是没做出来。。、、
这题涉及到并查集的删除操作。想到了设一个虚节点,但是我把虚节点设为了要删除的点的父节点,一直是栈溢出,目测是无限递归了。看了看别人的做法, 原来只要建一个映射就可以了,虚节点是作为的新的映射,每次删除一个点,就把他映射到一个新的点上去。
代码如下:
#include 
#include 
#incl...
                            
                            
                                分类:
其他好文   时间:
2014-10-02 12:57:02   
                                阅读次数:
163
                             
                    
                        
                            
                            
                                Android启动过程
1.  加载Linux内核
2. Android init进程对各种设备进行初始化,运行Android Framework所需用的各种Daemon(后台进程/守护进程),Context Manager,MediaServer,Zygote等
以下是init进程执行的Daemon进程:
USB Daemon(usbd): 管理USB连接
Android Debug ...
                            
                            
                                分类:
移动开发   时间:
2014-10-02 12:06:52   
                                阅读次数:
242
                             
                    
                        
                            
                            
                                [leetcode]Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid....
                            
                            
                                分类:
其他好文   时间:
2014-10-02 12:40:02   
                                阅读次数:
130
                             
                    
                        
                            
                            
                                点击打开链接题目链接
Just a Hook
Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 18010    Accepted Submission(s): 9013
Problem Description
...
                            
                            
                                分类:
其他好文   时间:
2014-10-02 13:29:52   
                                阅读次数:
247
                             
                    
                        
                            
                            
                                SPOJ Problem Set (classical)
375. Query on a tree
Problem code: QTREE
You are given a tree (an acyclic undirected connected graph) with N nodes, and edges numbered
 1, 2, 3...N-1.
We wi...
                            
                            
                                分类:
其他好文   时间:
2014-10-02 12:56:22   
                                阅读次数:
232
                             
                    
                        
                            
                            
                                题目链接:
http://acm.hdu.edu.cn/showproblem.php?pid=3072
Intelligence System
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1479    Acce...
                            
                            
                                分类:
其他好文   时间:
2014-10-02 12:56:12   
                                阅读次数:
965
                             
                    
                        
                            
                            
                                在上一个程序的基础上。在基类D3DBase添加一个摄像机函数
//摄像机
void D3DBase::setCamera()
{
	//按键事件
	//如果A,S,D,W,Q,E,Z,X,C键按下,移动摄像机
	if(GetAsyncKeyState('W') & 0x8000)	//前
		vZ+=0.001f;
	if(GetAsyncKeyState('S') & 0x8000)	//后...
                            
                            
                                分类:
其他好文   时间:
2014-10-02 13:12:42   
                                阅读次数:
359
                             
                    
                        
                            
                            
                                对于ratings[i+1],和ratings[i]的关系有以下几种:
1. 相等。相等时ratings[i+1]对应的糖果数为1
2.ratings[i + 1] > ratings[i]。在这种情况下,要寻找以ratings[i]开始的递增序列。
3.ratings[i + 1] 
对于任意一个递增序列 [2 3 4 5 6] 对应的糖果数为 [1 2 3 4 X]
对于任意一个递减...
                            
                            
                                分类:
其他好文   时间:
2014-10-02 13:29:12   
                                阅读次数:
203
                             
                    
                        
                            
                            
                                首先明白两个概念:
1. 深度遍历包括前中后序遍历三种;
2. 广度优先遍历就是层次遍历。
PS:
前中后序遍历,如果使用递归遍历,都很简单易理解;
如果使用非递归方式,首先想到的就应该是使用栈结构来控制整个过程,因为递归也是利用栈来实现的;
前中后序遍历的非递归方式中,后序遍历的非递归方式相比较而言,略复杂。...
                            
                            
                                分类:
其他好文   时间:
2014-10-02 12:39:03   
                                阅读次数:
301
                             
                    
                        
                            
                            
                                In the next few sections, we’ll write two versions of a function called add_time, which calculates the sum of two Time objects. They demonstrate two k...
                            
                            
                                分类:
其他好文   时间:
2014-10-02 11:48:22   
                                阅读次数:
116
                             
                    
                        
                            
                            
                                public class Accumulator Accumulator() 创建一个累加器 void addDataValue() 添加一个新的数据值 double mean() 所有数据值的平均值 String toString() 对象的字符串表示
                            
                            
                                分类:
其他好文   时间:
2014-10-02 11:31:32   
                                阅读次数:
173
                             
                    
                        
                            
                            
                                企业版DVD SQL Server 2005 Enterprise Edition(支持超大型企业)32 位DVD:ed2k://|file|cs_sql_2005_ent_x86_dvd.iso|972310528|4CEEF4B959894FD78C8F8416B4BA533E|/64 位DVD...
                            
                            
                                分类:
数据库   时间:
2014-10-02 13:11:22   
                                阅读次数:
216
                             
                    
                        
                            
                            
                                关于Android的多线程知识,请参考本人之前的一篇博客: 在Android当中,提供了异步消息处理机制的两种方式来解决线程之间的通信问题,一种是今天要讲的Handler的机制,还有一种就是之前讲过的 AsyncTask 机制。 一、handler的引入: 我们都知道,Android UI是线程不安...
                            
                            
                                分类:
移动开发   时间:
2014-10-02 12:21:12   
                                阅读次数:
340
                             
                    
                        
                            
                            
                                元素名属性解释serverport指定一个port,这个port负责监听关闭tomcat的请求shutdown指定向port发送的命令字符串servicename指定service的名字Connector(表示client和service之间的连接)port指定server端要创建的port号,并在...
                            
                            
                                分类:
其他好文   时间:
2014-10-02 13:11:02   
                                阅读次数:
209
                             
                    
                        
                            
                            
                                近期非常多人问我怎么破解WiFipassword…看来大家都对免费的东西比較有兴趣。要么也可能是我太招摇了…囧…好吧,我就写篇小小的教程,看完后,你应该可以破解大部分无线路由器password了,写这个教程也是为了加强大家对无线网络安全性的重视,后面也有简单的防破解的办法。好了,正式開始。首先,你须...
                            
                            
                                分类:
其他好文   时间:
2014-10-02 11:30:33   
                                阅读次数:
244