自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

转载 洛谷 马的遍历

#include #include #include #include using namespace std; queue qx; //定义横坐标队列 queue qy; //定义纵坐标队列 int n,m,a[405][405]; //存放步数 int i,j,k,dx,dy,p,q; const int dir[8][2]={ //状态转移数组==方向向量

2017-07-03 11:41:24 556

转载 BFS 入门题目 洛谷 P1162 填涂颜色

#include #include using namespace std; int dir[4][2]={{0,1},{1,0},{0,-1},{-1,0}}; int n,t,a[51][51]; queue qx,qy; int main() {     cin>>n;     for(int i=1;i     {         for(int j=1;j   

2017-07-03 10:51:32 718

转载 关于位运算 & | << >> ^ ~ %

主要来源 http://www.linuxidc.com/Linux/2014-03/98362.htm                https://zhidao.baidu.com/question/1576758038983362220.html 1.& 如果两个相应的二进制位都为1,则该位的结果值为1;否则为0。 是二进制“与”运算,参加运算的两个数的二进制按

2017-04-25 18:23:40 617

转载 codevs 1294 全排列

#include #include #include using namespace std; int a[10],book[10],n; void dfs(int step) {     int i;     if(step==n+1)     {         for(i=1;i         {             printf("%d ",a[i]);  

2017-04-11 19:05:26 691

转载 POJ3630(Trie树) PHONE LIST 算法转载

原文 http://www.cnblogs.com/zhourongqing/archive/2011/09/23/2186734.html 题目 http://poj.org/problem?id=3630#include #include #include #include #define N 10010 using namespace std; string tel[N]; bool

2017-04-02 18:33:44 331

转载 POJ 2001 Shortest Prefixes 短的前缀 代码整理

http://hzwer.com/2100.html 源代码 http://poj.org/problem?id=2001 题目 #include #include #include using namespace std; char a[10001][31]; int tot; int sz,t[300001][26],s[300001]; void insert(char ch[])/

2017-03-31 19:02:30 359

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除