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, ...
分类:
其他好文 时间:
2014-07-07 14:54:18
阅读次数:
219
1 //Accepted 164 KB 0 ms 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 queue qx,qy; 8 int n,m; 9 int ans;10 int d[][...
分类:
其他好文 时间:
2014-07-01 22:48:49
阅读次数:
194
Sort colors: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...
分类:
其他好文 时间:
2014-07-01 12:57:43
阅读次数:
179
算法的原理在:
点击打开链接
原理大概意思是:将R,G,B各分量信息 颜色信息划分为 N 区间。
例如下图:4X4X4 的区间
red
0-63
64-127
128-191
192-255
blue
0-63
43
78
18
0
64-127
45
67
33
2
128-191
1...
分类:
其他好文 时间:
2014-07-01 08:42:47
阅读次数:
181
#include
#include
#define MAX_MSG_BUF_LEN 512
int iKey = 6004;
struct ipcmsgbuf
{
long mtype;
char mtext[MAX_MSG_BUF_LEN];
};
int main( void )
{
int qid;
cha...
分类:
其他好文 时间:
2014-07-01 06:50:31
阅读次数:
199
直接上代码
/*
* bst.h
*
* Created on: Jun 20, 2014
* Author: buyuanyuan
*/
#ifndef BST_H_
#define BST_H_
#include
#include
typedef enum Color {
RED = 0,
BLACK = 1
} Color;
typede...
分类:
其他好文 时间:
2014-07-01 06:11:04
阅读次数:
224
Swift’s API includes many functions and instance methods that reflect its functional programming heritage. A prime example is calledreduce.You can red...
分类:
移动开发 时间:
2014-07-01 00:27:22
阅读次数:
329
题目大意:
计算两个字符串的最长的公共字符串字串的长度。
思路分析:
将两个串合并起来。
然后直接跑后缀数组求出height
然后就可以直接扫描一次height ,加个是不是在一个串中的判断就可以了。
#include
#include
#include
#include
#define maxn 200005
using namespace std;
cha...
分类:
其他好文 时间:
2014-06-30 19:59:06
阅读次数:
194
POJ 1979 题解
很简单的一道上手的深搜题目,题目意思很简单,就是不能走红色的砖。从起点开始深搜就行了。...
分类:
其他好文 时间:
2014-06-30 17:47:49
阅读次数:
228
1准备工具uputty_V0.63.0.0.43510830.exe------》用于连接到Linux服务器uWinscp------》用于将windows与Linux服务器文件互传2操作步骤复制代理至Linux服务器在SCOM安装光盘中,找到Linux服务器代理打开Wincap工具,将用于Linux服务器的SCOM代理,复制到Linux服务器根目录下1域..
分类:
系统相关 时间:
2014-06-29 21:01:51
阅读次数:
3924