摘要:
http://poj.org/problem?id=1321这是手册上的深搜题,首先我们要将棋盘的位置标记,因为行和列都不同,所以必须用两个数组分别来存点的横坐标和纵坐标,然后开始一个棋子一个棋子地摆上去,计算有几种摆法。#include<iostream>#include<string.h>using namespace std;const int N = 8*8 + 10;int x[N], y[N];bool visx[N], visy[N];int n, k, m;long long cnt;char ch[N];void dfs( int a, int ans 阅读全文
posted @ 2011-11-19 23:24
找回失去的
阅读(198)
评论(0)
推荐(0)
浙公网安备 33010602011771号