2011年8月21日
摘要: poj 2352题目大意:解决:树状数组,关键是要将x轴的下标从一开始可以将x都加1#include <iostream>#include <cstdio>using namespace std;const int N=32005;int n;int c[N];int lev[N];int lowbit(int x){ return x&(-x);}void updata(int pos,int inc){ for(int i=pos;i<N;i+=lowbit(i)) c[i]+=inc;}int getsum(int pos){ int sum=0; 阅读全文
posted @ 2011-08-21 11:36 猿类的进化史 阅读(433) 评论(0) 推荐(0) 编辑
摘要: 简单搜索(1)深度优先搜索 (poj2488,poj3009,poj1321) (2)广度优先搜索 (poj3278,poj1426,poj3126,poj3087.poj3414,poj2251,poj3083)(3)简单搜索技巧和剪枝(poj2531,poj1416,poj2676,1129)搜索、回溯、遍历1022 1111 1118 1129 1190 1562 1564 1573 1655 2184 2225 2243 2312 2362 2378 23861010,1011,1018,1020,1054,1062,1256,1321,1363,1501,1650,... 阅读全文
posted @ 2011-08-21 00:01 猿类的进化史 阅读(3791) 评论(0) 推荐(0) 编辑