码迷,mamicode.com
首页 >  
搜索关键字:tasks and back stack    ( 26134个结果
HDU 4337 King Arthur's Knights 找出一条哈密顿回路
n个点m条无向边 输出一条哈密顿回路 #include #include #include using namespace std; const int N = 155; int n, m; bool mp[N][N]; int S, T, top, Stack[N]; bool vis[N]; void _reverse(int l,int r) { while...
分类:其他好文   时间:2014-10-06 23:35:01    阅读次数:189
hdu5044 Tree 树链剖分,点剖分,边剖分,非递归版
hdu5044 Tree 树链剖分,点剖分,边剖分,非递归版 //#pragma warning (disable: 4786) //#pragma comment (linker, "/STACK:16777216") //#pragma comment(linker, "/STACK:60400000,60400000") //HEAD #include #include #i...
分类:其他好文   时间:2014-10-06 21:36:10    阅读次数:663
模板系列(一)模板的模板参数
在之前,我们写过类似的stack template > class Stack { public: void push(const T &); void pop(); T top() const; bool empty() const; private: Alloc cont_; }; 那么我们使用...
分类:其他好文   时间:2014-10-06 21:18:20    阅读次数:291
Class diagrams
So far we have seen stack diagrams, which show the state of a program, and object diagrams, which show the attributes of an object and their values. T...
分类:其他好文   时间:2014-10-06 20:39:30    阅读次数:117
1004 Anagrams by Stack
考察DFS的应用,用栈描述字符串的变化过程。 1 #include 2 #include 3 int len1,len2; 4 char str1[100],str2[100],stk[100],ans[200]; 5 6 void output(int n){ 7 int i; 8 ...
分类:其他好文   时间:2014-10-06 17:03:40    阅读次数:147
Codeforces 475C Kamal-ol-molk's Painting 模拟
题目链接:点击打开链接 题意:给定n*m的矩阵 X代表有色 .代表无色 用一个x*y的矩阵形刷子去涂色。 刷子每次可以→或↓移动任意步。 若能够染出给定的矩阵,则输出最小的刷子的面积 若不能输出-1 思路: 先找到连续最小的x,y 因为至少一个边界和x或y相等,所以枚举(x,i) 和 (i,y)就可以了。 #pragma comment(linker, "/STACK:...
分类:其他好文   时间:2014-10-06 12:44:55    阅读次数:211
Codeforces 475B Strongly Connected City 强连通裸题
题目链接:点击打开链接 题意: 就是n*m的矩阵, 每行能走的方向 每列能走的方向 问:图是否强连通。 只要4个边界成环即可。 或者无脑tarjan == #pragma comment(linker, "/STACK:102400000,102400000") #include #include #include #include #include using nam...
分类:其他好文   时间:2014-10-06 12:12:10    阅读次数:228
jquery实现返回基部案例效果
webrx-title /*returnTop*/ p#back-to-top{ position:fixed; display:none; bottom:100px; right:80px; } p#back-to-top a{ text-align:center; text-decoration:none;...
分类:Web程序   时间:2014-10-06 11:26:30    阅读次数:206
HDU-1022-Train Problem I
题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1022模拟栈:代码#includeint main(void){ int n,i,j,k,t,r[23],stack[13]; char si[13],so[13]; while(scan...
分类:其他好文   时间:2014-10-06 00:35:09    阅读次数:223
迭代适配器(一) back_insert和front_insert的简单实现
当我们调用copy函数时,要确保目标容器足够大,例如://将vec的所有元素拷贝到以coll.begin()为起始地址的位置copy(vec.begin(), vec.end(), coll.begin());如果之前没有为coll分配好足够的内存,就会引发越界错误。如果我们无法提前为coll预分配...
分类:其他好文   时间:2014-10-05 23:38:49    阅读次数:272
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!