2013年9月29日

poj 1321 棋盘问题 简单DFS

摘要: 题目链接:http://poj.org/problem?id=1321很久没有敲搜索了啊,今天敲了个水题练练手,哈哈。。。。题目大意: 就是求在n*n的方格上放置k个棋子的方案数代码: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int n,k; 7 char map[10][10]; 8 int visit[10]; 9 int sum;10 int ans;11 bool Jude(int k,int num)12 {13 int i;14 if(k==-1) return 1;15 ... 阅读全文

posted @ 2013-09-29 17:00 GyyZyp 阅读(173) 评论(0) 推荐(0) 编辑

导航