六角填数(深度优先搜索)

如图所示六角形中,填入1~12的数字。使得每条直线上的数字之和都相同。     图中,已经替你填好了3个数字,请你计算星号位置所代表的数字是多少? 方法一:dfs #include<iostream>#include<cstring> #include<cstdio> #include<algorithm> using namespace std; int a[13],book[13];   //
相关文章
相关标签/搜索