04 2015 档案

摘要:leetcode -house-robberhttps://leetcode.com/problems/house-robber/Q:You are a professional robber planning to rob houses along a street. Each house has... 阅读全文
posted @ 2015-04-29 22:12 cnblogshnj 阅读(152) 评论(0) 推荐(0)
摘要:leetcode -Count and SayQ:The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1... 阅读全文
posted @ 2015-04-28 23:55 cnblogshnj 阅读(163) 评论(0) 推荐(0)
摘要:leetcode -https://leetcode.com/problems/count-primes/Q:Description:Count the number of prime numbers less than a non-negative number,nHint:The number ... 阅读全文
posted @ 2015-04-27 17:32 cnblogshnj 阅读(146) 评论(0) 推荐(0)
摘要:leetcode -Longest Common PrefixQ:Write a function to find the longest common prefix string amongst an array of strings. 1 class Solution { 2 public: 3... 阅读全文
posted @ 2015-04-27 09:29 cnblogshnj 阅读(149) 评论(0) 推荐(0)
摘要:http://codevs.cn/problem/1012/题目描述Description输入二个正整数x0,y0(2 #include int x,y; bool zhi(int x) { for (int i=2;i<=sqrt(x);++i) if (x... 阅读全文
posted @ 2015-04-20 23:15 cnblogshnj 阅读(363) 评论(0) 推荐(0)
摘要:#includeusing namespace std;int main(){ char a1[]="hello word!"; char *p1="hello word!";// a1[2]='E';// *(p1++) = 'E'; for(int i=0; a1[... 阅读全文
posted @ 2015-04-03 11:14 cnblogshnj 阅读(204) 评论(0) 推荐(0)