码迷,mamicode.com
首页 >  
搜索关键字:__next__    ( 15001个结果
POJ训练计划2195_Going Home(网络流/费用流)
解题报告 题目传送门 思路: bfs建图跑一下费用流就行。 #include #include #include #include #define inf 0x3f3f3f3f using namespace std; struct E { int v,cost,cap,next; } edge[100000]; int head[1000],cnt,dis[1000],...
分类:其他好文   时间:2014-08-23 19:07:51    阅读次数:243
UVa10986_Sending email(最短路)(小白书图论专题)
解题报告 思路: 裸裸的最短路。 #include #include #include #include #define inf 0x3f3f3f3f #define N 40000 #define M 100000 using namespace std; struct node { int v,w,next; }edge[M]; int head[N],dis[N],vi...
分类:其他好文   时间:2014-08-23 19:05:51    阅读次数:162
局域网内SSH登陆等待时间长,反应慢的处理方法
l 故障现象:在使用SSH工具远程登录服务器时,出现登陆提示符很久才出现的情况。l 问题查找:可以在ssh命令后面加上“-v“ 参数,输出debug信息定位问题。通常你会看到类似这样的信息:debug1: Next authentication method: gssapi-with-micdebu...
分类:其他好文   时间:2014-08-23 17:43:01    阅读次数:235
AC自动机 病毒侵袭 hdu2896
和hdu2222题相似的水题 提示: 1)连着RE了好多发,没想明白,看了一下网上题解才知道,输入的不一定都是字母,所以next要开100!!!!!!! #include #include int tot; char str[10005]; int t; //int time[100]; struct trie { trie *fail; trie *next[100];...
分类:其他好文   时间:2014-08-23 16:53:36    阅读次数:279
hdu 4971 多校10最大权闭合图
/* 很明显的最大权闭合图题 */ #include #include #include using namespace std; #define N 2100 #define inf 0x3fffffff struct node { int u,v,w,next; }bian[N*N*20]; int head[N],yong,dis[N],work[N]; void init(){ yong=...
分类:其他好文   时间:2014-08-23 16:51:11    阅读次数:251
SICP 1.31 1.32 1.33
解:1.31 (define?(add-1?x) ??(+?x?1)) (define?(product?term?a?next?b) ??(if?(>?a?b) ??????1 ??????(*?(term?a)?(product?term?(next?a)?next?b)))) (define?(prod...
分类:其他好文   时间:2014-08-23 15:28:31    阅读次数:199
UVA 1358 - Generator(dp+高斯消元+KMP)
UVA 1358 - Generator 题目链接 题意:有m种字符(从'A'开始往后数的大写字母),现在有一个字符串,长度不超过12,现在每次随机生成一个字母,要求能产生该字符串的期望长度 思路:dp[i]表示产生长度i的期望长度,那么每次产生一个字符,对应m种转移,每种转移的概率为1/m,转移后的长度可以利用KMP的next数组去快速获得,然后由于转移可能形成环的情况,所以无...
分类:其他好文   时间:2014-08-23 12:45:10    阅读次数:276
A - Excellent Team
Description Gibbs: Next! First Pirate: My wife ran off with my dog and I'm drunk for a month. Gibbs: Perfect. Next! Second Pirate: Me hav...
分类:其他好文   时间:2014-08-23 11:12:50    阅读次数:224
差分约束+SPFA+栈
#include #include #include #include #define INF 0x3f3f3f3fusing namespace std;struct node{ int u,v,w,next;}edge[150001];int head[30001],dis[30001],...
分类:其他好文   时间:2014-08-23 09:55:10    阅读次数:186
HDU 2896 病毒侵袭(AC自动机模版题)
AC自动模版题,中文题目就不叙述题意了啊。 AC自动主要是构造出字典树之后找到fail指针的跳转,类似于KMP里面的next数组的跳转啊,注意这里是多模式跳转。意思就是这个串跳到下一个串的什么位置啊。 先帖一下,做多了再一起总结吧。 病毒侵袭 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K ...
分类:其他好文   时间:2014-08-22 22:36:57    阅读次数:248
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!