//问题:
//给你一个数组,a[]={1,1,1,1,1,2,2,2,2,3,3,3,4,5,6}
//要输出的结果是1,2,3,4,5,6.(去除重复的数字,要求时间空间的考虑).#include
using namespace std;
template
class Bitset
{
public:
Bitset()
{
_Tidy();//调用_Tidy()函数会初...
分类:
编程语言 时间:
2015-04-28 11:57:40
阅读次数:
189
//有这样一个二维矩阵A[N][N],满足j < k时, 1)a[j] < a[k]; 2)a[j] < a[k]
//(其实就数据从左上角到右下角纵横方向上都递减),给定一个数target,如何快//速搜索是否 在这个矩阵中,是的话输出二维坐标,否则输出Null。
#include
using namespace std;
void Grial(int (*a)[4],int x)
{
i...
分类:
编程语言 时间:
2015-04-28 11:57:40
阅读次数:
146
刚开始想多了,其实可以贪心的
//刚开始想太多了,其实可以贪心的,每来一个点,接在值最相近的路径后面,如果没有一个比它大的,则另开一条路径
#include
#include
#include
using namespace std;
const int inf=9999999;
int dp[10005];
int main(){
#ifndef ONLINE_JUDGE
freopen...
分类:
其他好文 时间:
2015-04-28 11:57:29
阅读次数:
119
在业务流程模型中使用人工活动(Using Human Interaction in a Business Process Model)
This topic describes the procedure to use a human interaction activity in a business process model....
分类:
其他好文 时间:
2015-04-28 11:56:19
阅读次数:
172
#include
using namespace std;
#define maxn 505
typedef pair P;
int W, H, N;
int X1[maxn], X2[maxn], Y1[maxn], Y2[maxn];
bool fld[maxn][maxn];
int d[2][4] = {{-1, 0, 1, 0}, {0, -1, 0, 1}};
int comp...
分类:
其他好文 时间:
2015-04-28 11:54:28
阅读次数:
112
#include
using namespace std;
struct Node
{
char value;
Node *left;
Node *right;
};
//重构函数核心
Node *Constructcore(char *start_preorder,char *end_preorder,char *start_inorder,char *end_inorder)
{
ch...
分类:
其他好文 时间:
2015-04-28 11:54:27
阅读次数:
128
#include
#include
using namespace std;
struct Node
{
char value;
Node *left;
Node *right;
};
void create(Node *&T)
{
char c;
cin>>c;
if('#'==c)
{
T=NULL;
}
else
{
T=new Node;
T->value=...
分类:
其他好文 时间:
2015-04-28 11:48:03
阅读次数:
113
重写 AuthorizeAttribute 的 OnAuthorization 方法:using System.Web.Mvc;namespace Demo.Web.Common{ public class AuthorizeUserAttribute : AuthorizeAttribute...
分类:
Web程序 时间:
2015-04-28 11:17:29
阅读次数:
151
//C++模板类复习
#include
using namespace std;
template
class test
{
private:
T1 temp1;
T2 temp2;
public:
test(){}
test(T1 data1, T2 data2):temp1(data1),temp2(data2){}
v...
分类:
编程语言 时间:
2015-04-28 09:55:34
阅读次数:
166
分析:找到吉米从办公室穿过森林回到家(也就是从点1到点2)的最短路径有多少条,其中要满足如果要走A到B这条路,那么就有从A到终点的距离都大于B到终点的距离。
解法:spfa算法+记忆化深搜
1、spfa求出从终点2到其他所有点的最短路
2、记忆化DFS从1开始向其他点深搜,最后结果就是dp[1]。
#include
#include
using namespace std;
...
分类:
编程语言 时间:
2015-04-28 09:55:16
阅读次数:
145