摘要: 1 #include <iostream> 2 #include <string> 3 #include <stdio.h> 4 #include <cmath> 5 #include <algorithm> 6 using namespace std; 7 8 bool judge(string 阅读全文
posted @ 2020-09-30 12:43 然终酒肆 阅读(268) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/msymm/articles/9917089.html 阅读全文
posted @ 2020-09-30 11:13 然终酒肆 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 1 #include <cstdio> 2 #include <set> 3 #include <iostream> 4 #include <cstring> 5 using namespace std; 6 7 8 9 int main() 10 { 11 int n, i, cnt = 0;in 阅读全文
posted @ 2020-09-30 10:29 然终酒肆 阅读(250) 评论(0) 推荐(0) 编辑
摘要: Description给定一个n*n的棋盘,棋盘中有一些位置不能放皇后。现在要向棋盘中放入n个黑皇后和n个白皇后,使任意的两个黑皇后都不在同一行、同一列或同一条对角线上,任意的两个白皇后都不在同一行、同一列或同一条对角线上。问总共有多少种放法?n小于等于8。Input输入描述:输入的第一行为一个整数 阅读全文
posted @ 2020-09-30 09:40 然终酒肆 阅读(106) 评论(0) 推荐(0) 编辑