USACO 1.5.4 Checker Challenge
摘要:
题意:经典的八皇后问题解法:采用朴素的每一次放置都与前面的所有行进行比较,在N =13的时候时间会爆掉《入门经典》上提供的方法很经典,vis数组的使用,具体见《入门经典》125页/*ID:lsswxr1PROG:checkerLANG:C++*/#include#include#include#includeusing namespace std;#define maxn 15ifstream fin("checker.in");ofstream fout("checker.out");int N, tot;int outputNums;int curP 阅读全文
posted @ 2013-12-26 23:46 小书包_Ray 阅读(249) 评论(0) 推荐(0) 编辑