题解列表

筛选

九宫重排 (C++代码)

摘要:#include<cstdio> #include<cstring> using namespace std; typedef int state[9]; const int maxn = 1……

分糖果 (C++代码)

摘要:#include<cstdio> #include<iostream> #include<algorithm> using namespace std; int n ,cnt=0; int ……

2n皇后问题 (Java代码)详解

摘要:解题思路:先放白皇后再放黑皇后,用for循环一行放一个,逐个位置试一下,检查一下是否能放,知道把最后一个黑皇后放好就count++,回溯法的关键在于,检查这个位置能放皇后,开始放一个(调用函数),在下……