搜索
文章平均质量分 69
Pekary
Read the tea leaves.
展开
-
hdu 1016
题意:要求每两个相邻的数的和都是原创 2014-08-12 13:43:50 · 467 阅读 · 0 评论 -
hdu 2610
深搜#includeint n, p, len, cnt;bool flag;int num[1024];struct{ int n, pos;}tmp[1024];bool isRepet(int s, int e){ for(int i = s + 1; i if(num[i] == num[原创 2014-08-11 14:45:49 · 507 阅读 · 0 评论 -
poj1204 字典树+DFS
#include#includeconst int N = 1008;const int CAP = 150;char stc[N][N];char word[N];int res[N][3];int dir[8][2]={0, -1, 1, -1, 1, 0, 1, 1, 0, 1, -1, 1, -1, 0, -1, -1};int ro原创 2015-08-17 15:35:01 · 424 阅读 · 0 评论 -
hdu 2553
N皇后问题。深搜。#include#includeint x[16],y[16];int n, num;bool isPlace(int a){ for(int i = 1; i < a; i++) if(fabs(a - i) == fabs(x[a] - x[i]) || x[a] == x[i]) return f原创 2014-08-12 14:55:47 · 468 阅读 · 0 评论