Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.
Here, we will use the integers ...
分类:
其他好文 时间:
2014-08-16 12:35:30
阅读次数:
233
问题描述:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".解题思路:先利用split()方法将句子按空格分为...
分类:
其他好文 时间:
2014-08-16 11:08:40
阅读次数:
229
Blue Jeans
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 12233
Accepted: 5307
Description
The Genographic Project is a research partnership between IBM and...
分类:
其他好文 时间:
2014-08-15 18:01:49
阅读次数:
248
# include
# include
# include
using namespace std;
int next[100];
char pat[100];
char a[100][100];
int ma;
int lenp;
int n;
void Getnext()
{
int i=0,j=-1;
next[0]=-1;
while(i<=lenp)
...
分类:
其他好文 时间:
2014-08-15 16:01:18
阅读次数:
176
1103: [POI2007]大都市megTime Limit:10 SecMemory Limit:162 MBSubmit:1145Solved:569[Submit][Status]Description在经济全球化浪潮的影响下,习惯于漫步在清晨的乡间小路的邮递员Blue Mary也开始骑着摩...
分类:
其他好文 时间:
2014-08-15 14:23:08
阅读次数:
440
创建 Array 的基本方式有两种。第一种是使用 Array 构造函数,如下所示:var colors = new Array(); 也可以如下,如下代码创建了一个包含3个字符串值的数组:var colors = new Array("red","green","blue"); 创建 Arr...
分类:
Web程序 时间:
2014-08-14 00:56:07
阅读次数:
187
Problem Description:
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
click to show clarification.
Clarificat...
分类:
其他好文 时间:
2014-08-13 22:33:27
阅读次数:
276
Red/Blue Spanning TreeTime Limit: 2000msMemory Limit: 131072KBThis problem will be judged onHDU. Original ID:426364-bit integer IO format:%I64d Java c...
分类:
其他好文 时间:
2014-08-13 21:55:57
阅读次数:
251
LeetCode新题,但是比较简单,直接用栈即可Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click to show clarification.Clarification:What constitut...
分类:
其他好文 时间:
2014-08-13 08:01:55
阅读次数:
182
red放到后面显然更优,dp【i】【j】表示前i个塔里有j个blue,最后枚举有多少个red
Stupid Tower Defense
Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)
Total Submission(s): 599 Accepted S...
分类:
其他好文 时间:
2014-08-12 22:04:24
阅读次数:
227