4 阶Latin 方问题
标签:
latin拉丁方算法it |
分类: 编程技术 |
问题描述:
算法实现:
#include <iostream.h>
int Latin[4][4];
int count = 0;
int IsOK(int r, int c, int v)
{
}
void BackTrace(int l)
{
}
void main()
{
}
说明:上述代码是用于求解第一行为1234的拉丁方,共有24个可行解。如果要得到4阶拉丁方的所有可行解,只需在主函数中调用BackTrace(1),最终结果有576个。

加载中…