上一页 1 ··· 11 12 13 14 15
摘要: #include#include#include#define N 110int m, n, k, x1, x2, y1, y2;char map[N][N];int v[N][N][N];//当时间是k的倍数时,障碍消失,之后又重现,所以在平时使用的二维标记数组中再加一维int d[4][2] =... 阅读全文
posted @ 2015-05-02 10:47 午夜阳光~ 阅读(257) 评论(0) 推荐(0) 编辑
摘要: riemann与marjorie拼接后riemannmarjorie前缀与后缀公共部分为 rie 长度为 3(即next[l] = next[14]的值,l为拼接后的长度)但:aaaa与aa拼接后aaaaaa,next[l]不是结果,所以在aaaa和aa间加“#”,即aaaa#aa;#include... 阅读全文
posted @ 2015-04-29 00:40 午夜阳光~ 阅读(149) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1711#include#include#include#includeint a[1000010], b[10010], next[10010];int n, m;void GetNext(int b[])//获得... 阅读全文
posted @ 2015-04-24 11:06 午夜阳光~ 阅读(195) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1010奇偶剪枝:可以把map看成这样: 0 1 0 1 0 1 1 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 1 0 0 1 0 1 0 1 从为 0 的格子走一步,必然走向为 1 的格子 从为 ... 阅读全文
posted @ 2015-04-23 12:24 午夜阳光~ 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 题目大意:只包含01的图片顺时针旋转,角度只包含0度,90度,180度,270度 阅读全文
posted @ 2015-04-20 11:52 午夜阳光~ 阅读(145) 评论(0) 推荐(0) 编辑
摘要: //代码://方法1:Dijkstra's Algorithm#include#include#include#define INF 0xfffffff#define N 110#define min(a, b)(a d[x] + maps[x][j]) d[j] =... 阅读全文
posted @ 2015-04-18 17:44 午夜阳光~ 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 题目大意:定理:把一个至少两位的正整数的个位数字去掉,再从余下的数中减去个位数的5倍。当且仅当差是17的倍数时,原数也是17的倍数 。例如,34是17的倍数,因为3-20=-17是17的倍数;201不是17的倍数,因为20-5=15不是17的倍数。输入一个正整数n,判断n是否能被17整除代码:#in... 阅读全文
posted @ 2015-04-18 00:25 午夜阳光~ 阅读(691) 评论(0) 推荐(0) 编辑
摘要: #include#include//头文件using namespace std;int main(){ queueQ;//队列定义 int n, i, t; while(scanf("%d", &n) != EOF) { for(i = 1 ; i pq;这... 阅读全文
posted @ 2015-04-16 12:53 午夜阳光~ 阅读(224) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15