码迷,mamicode.com
首页 >  
搜索关键字:using    ( 53562个结果
c++数组操作(重复,排序,bitset)
//问题: //给你一个数组,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
C++查找
//有这样一个二维矩阵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
HDU 1257 最少拦截系统
刚开始想多了,其实可以贪心的 //刚开始想太多了,其实可以贪心的,每来一个点,接在值最相近的路径后面,如果没有一个比它大的,则另开一条路径 #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
(Cordys BOP 4.3)在业务流程模型中使用人工活动
在业务流程模型中使用人工活动(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
3.9已知二叉树的 前序遍历和中序遍历的结果,重构出原二叉树
#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
3.10分层打印二叉树的节点
#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
ASP.NET MVC AuthorizeAttribute OnAuthorization 验证跳转<转载>
重写 AuthorizeAttribute 的 OnAuthorization 方法:using System.Web.Mvc;namespace Demo.Web.Common{ public class AuthorizeUserAttribute : AuthorizeAttribute...
分类:Web程序   时间:2015-04-28 11:17:29    阅读次数:151
C++模板类复习
//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
HDU ACM 1142 A Walk Through the Forest->SPFA算法+记忆化深搜
分析:找到吉米从办公室穿过森林回到家(也就是从点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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!