码迷,mamicode.com
首页 >  
搜索关键字:code    ( 108667个结果
Am命令
Am.java中: View Code@Override public void onRun() throws Exception { mAm = ActivityManagerNative.getDefault(); if (mAm == null) { System.err.println(NO...
分类:其他好文   时间:2014-05-25 12:20:45    阅读次数:391
Intellij IDEA常用快捷键和一些配置——Mac版
常用的快捷键代码补全Ctrl + space删除行Command + D注释Command + /导入包Command + shift + O格式化代码Command + shift + F运行Ctrl + Alt + RIncremental SearchCommand + J 在编辑器中实现快....
分类:其他好文   时间:2014-05-25 12:17:37    阅读次数:287
hdu4511小明系列故事——女友的考验(ac自动机+最短路)
链接预处理出来任意两点的距离,然后可以顺着trie树中的节点走,不能走到不合法的地方,另开一维表示走到了哪里,依次来更新。注意判断一下起点是不是合法。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include ...
分类:其他好文   时间:2014-05-25 12:14:33    阅读次数:223
zoj3228Searching the String(ac自动机)
链接这个题把病毒分为了两种,一种包含可以覆盖,另一种不可以,需要分别求出包含他们的个数,可以把两种都建在一颗tire树上,在最后求得时候判断一下当前节点是属于哪种字符串,如果是不包含的需要判断一下pre[i]+len[i] 2 #include 3 #include 4 #include 5...
分类:其他好文   时间:2014-05-25 11:45:36    阅读次数:263
POJ 1459(EK)
这题是学着小媛学姐写的.. 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 #define N 120 8 9 int n, np, nc, m;10 int cap[N][N];11.....
分类:其他好文   时间:2014-05-25 11:44:33    阅读次数:219
POJ 1273(EK)
题目大概意思是,有N条水沟和M个水池,问从第一个水池到最后一个水池在同一时间内能够流过多少水第一行有两个整数N,M接下来N行,每行有3个整数,a,b,c,代表从a到b能够流c单位的水超级模板题,一个有向图,源点为1,汇点为M,套最大流模板就行了我就通过这水题理解EK的... 1 #include 2...
分类:其他好文   时间:2014-05-25 11:43:33    阅读次数:224
hdu2296Ring(ac自动机+dp)
链接dp[i][j]表示长度为i在节点J的时候的权值最大值,根据trie树转移一下就行,需要每次都取最小的,所以需要另开一数组保存字典序最小的状态。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7...
分类:其他好文   时间:2014-05-25 11:42:29    阅读次数:268
hdu2457DNA repair(ac自动机+dp)
链接从开始节点往下走,不能走到病毒节点,如果当前状态与原始串不一样就+1,取一个最小值. 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #incl...
分类:其他好文   时间:2014-05-25 11:41:29    阅读次数:270
zoj 3195 Design the city
DescriptionCerror is the mayor of city HangZhou. As you may know, the traffic system of this city is so terrible, that there are traffic jams everywhe...
分类:其他好文   时间:2014-05-25 11:40:26    阅读次数:393
hdu4758Walk Through Squares(ac自动机+dp)
链接dp[x][y][node][sta] 表示走到在x,y位置node节点时状态为sta的方法数,因为只有2个病毒串,这时候的状态只有4种,根据可走的方向转移一下。这题输入的是m、N,先列后行,因为输反了,WA了N次啊。。 1 #include 2 #include 3 #include ...
分类:其他好文   时间:2014-05-25 11:37:30    阅读次数:297
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!