Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.
Notes: It is intended for this problem to be specifi...
分类:
其他好文 时间:
2014-05-15 05:00:50
阅读次数:
229
Friend Chains
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2882 Accepted Submission(s): 970
Problem Description
For a group o...
分类:
其他好文 时间:
2014-05-15 11:21:04
阅读次数:
438
【题目】
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.
【题意】
题意是找出字符串S中最长回文子串,S最长为1000,保证有唯一解
【思路】
原字符串用特殊字符#间隔,如下所示:
#a...
分类:
其他好文 时间:
2014-05-15 03:31:25
阅读次数:
299
/*
* hdu 最小公倍数
* date 2014/5/13
* state AC
*/
#include
using namespace std;
int gcd(int x,int y)
{
while(x!=y)
{
if(x>y)x=x-y;
else y=y-x;
}
return x;
}
int main()
...
分类:
其他好文 时间:
2014-05-14 14:29:59
阅读次数:
225
1、Ring的基本概念
Ring是swfit中最重要的组件,用于记录存储对象与物理位置之间的映射关系,当用户需要对Account、Container、Object操作时,就需要查询对应的Ring文件(Account、Container、Object都有自己对应的Ring),Ring 使用Region(最近几个版本中新加入的)、Zone、Device、Partition和Replica来维护这些信...
分类:
其他好文 时间:
2014-05-14 15:22:15
阅读次数:
1213
这章主要讲 Ruby Object 与C++对象绑定
//============================================================================
// Name : RubyCPP.cpp
// Author : frodo
//===================================...
分类:
其他好文 时间:
2014-05-15 05:40:27
阅读次数:
256
Sometime, we need to open a file or buffer which name began with current word in emacs.
Here I give the solution as follows.
(provide 'quick-file-jump)
(defun ab/quick-buffer-jump ()
"Quickly jum...
分类:
其他好文 时间:
2014-05-15 15:02:20
阅读次数:
373
这是一本写了四年的书,写它的时候儿子还没有出生,写完的时候儿子已经三岁了。 太多的感慨,总结起来又似乎只有一句话,那就是无知者无畏。 还记得是2009年的一个下午,在北京OpenParty上刚刚做完一个关于流程管理的分享,辛总找到了我,说正在写一本关于工作流和BPM的书,问我愿不愿意参加。想都没想,我说,没有问题。我的信心来自于之前在辛总手下做了三年的工作流产品经理,通读过全部...
分类:
其他好文 时间:
2014-05-15 03:47:02
阅读次数:
211
Given an array of integers, every element appears twice except for one. Find that single one....
分类:
其他好文 时间:
2014-05-15 07:20:39
阅读次数:
264
//dal类: public class BaseDAL
{
string strConn = "";
public BaseDAL(string connString)
{
strConn = connString;
}
#region 通用增删改查
#region...
分类:
其他好文 时间:
2014-05-15 05:20:18
阅读次数:
283
应该来说这是一个很失败的结果,本届省赛铩羽而归。正如志愿者所说,打铁是一件很丢人的事情。
作为队长,完全没有想到会是这样的一次旅程。虽然因为去baidu的实习和各种offer的申请,对acm抱着能水就水绝不深究的敷衍态度。但之前着实还是参加了一些商业比赛,成绩都还可以,表面的繁盛更加放松了我的警惕。完全没有想到,正是线下赛的放松,使我线上赛的心态发生了重大的变化,并连锁反应了这一系列不理...
分类:
其他好文 时间:
2014-05-15 07:07:21
阅读次数:
250
http://blog.csdn.net/phphot...
分类:
其他好文 时间:
2014-05-15 05:26:11
阅读次数:
187
矩形的个数
时间限制:1000 ms | 内存限制:65535 KB
难度:1
描述在一个3*2的矩形中,可以找到6个1*1的矩形,4个2*1的矩形3个1*2的矩形,2个2*2的矩形,2个3*1的矩形和1个3*2的矩形,总共18个矩形。
给出A,B,计算可以从中找到多少个矩形。
输入本题有多组输入数据(
输入2个整数A,B(1
输出输出...
分类:
其他好文 时间:
2014-05-14 15:09:01
阅读次数:
237
没接触单片机前,偶尔听过感觉和我距离好远。后来了解后,发现单片机真的不可或缺啊!这里我将说说我身边的单片机。...
分类:
其他好文 时间:
2014-05-14 14:49:24
阅读次数:
348
题意:给定一棵二叉树,返回按层遍历的结果
思路1:bfs,定义一个新的struct,记录指针向节点的指针和每个节点所在的层
复杂度1:时间O(n),空间O(n)
思路2:dfs
递归函数:
void levelOrder(TreeNode *root, int level, vector<vector >&result)
表示把根为root的树按层存放在result中,其中level表示当前的层数
复杂度2:时间O(n),空间O(n)
相关题目:...
分类:
其他好文 时间:
2014-05-15 14:46:06
阅读次数:
355