Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:数独有什么好的算法吗?In Reply To:数独有什么好的算法吗? Posted by:crz1987 at 2008-04-25 19:27:55 有算法,随便写了一些,比暴搜快很多(平均意义下) the solution of Sukodu (0)generate the list of candidate numbers of each unfilled grid.(生成候选数表) (1)if there is only one candidate number in a grid, then fill the grid with the candidate number.(唯一数法) (2)In all unfilled grids of a row(column)(or 3*3 grid), if there is only one grid has the candidate number x, then fill the grid with x.(隐含唯一数法) (3)if there are only 2(3) candidiate numbers in 2(3) grids of a row(column)(or 3*3 grid), then these 2(3) grids must be filled in with these 2(3) numbers.(二(三)链数法) (4)if there are only 4-8 candidiate numbers in 4-8 grids of a 3*3 grid, then these 4-8 grids must be filled in with these 4-8 numbers.(四链数法) (5)... Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator