数学建模社区-数学中国

标题: sudoku.CPP [打印本页]

作者: jixie0604    时间: 2009-1-12 17:24
标题: sudoku.CPP
这个m文件,给大家分享,也许有用。关于sudoku的。

m文件代码.doc

32.5 KB, 下载次数: 8, 下载积分: 体力 -2 点

新建 Microsoft Office Word 文档.doc

33 KB, 下载次数: 9, 下载积分: 体力 -2 点


作者: ynuzgw9    时间: 2009-1-13 17:13
well done!
作者: 2002sjl2908    时间: 2009-1-13 21:08
好的  谢谢
作者: 模客    时间: 2009-1-13 22:06
什么是sudoku啊?0 z- [5 e* o1 p8 k
还想请各位讲解讲解。
作者: 模客    时间: 2009-1-13 22:07
好像楼主使用了混合编程,
作者: 沉思的沼泽    时间: 2009-1-16 20:01
soduku?????what?
作者: 无忧    时间: 2009-1-26 17:59
去年做的就是这个,后来又辛苦了一个月,才终于作出点东西。
作者: 无忧    时间: 2009-1-26 18:00
Sudoku is played over a 9x9 grid, divided to 3x3 sub grids called "regions":
5 C6 V+ B/ f  o3 x
: d& C6 D1 Z) m& N, { 5 v" ~- W2 E8 W6 x) O' h
Region     
" ~* n  h8 M/ r/ [7 d) M% K4 a0 j $ c- U. a' q( _" l
3 J, m- f3 Z$ j8 l" K) l' c
- Sudoku begins with some of the grid cells already filled with numbers:
; ?- E0 l) @' f2 z) s6 W) h+ K+ b# O" J$ C( {# o6 ]/ V* u
. a( `' `8 l% m; g
6 A$ m) G+ \7 s! N# N- s4 k
- The object of Sudoku is to fill the other empty cells with numbers between 1 and 9 (1 number only in each cell) according the following guidelines:
: A7 S: L1 p8 A' w# L0 \* R  A/ \2 `( U. o' V! ~
1. Number can appear only once on each row:
* p$ z/ K5 r- A, Y8 m
5 z7 ^+ h! k; e/ x# J1 @4 _- h! f, RAllowed   
* g3 X, C, K% D' B   
! q3 }( O7 E2 u, zNot allowed   
* ], Y- r" x. d- t. H' k3 f' |8 A3 @5 n( }% |
2. Number can appear only once on each column:
; K/ v$ |9 t6 ?1 F6 w
# j' ?8 W% L+ k0 LAllowed    Not allowed  
. v5 o) h' z: ?- I9 ]      G/ q2 e+ X2 n- n- b

% F0 W* f/ W' M- T3. Number can appear only once on each region:
, r& Y+ l4 p: |& [
; O4 F  S/ }& \6 A. Q. gAllowed    Not allowed  5 `( G/ R( S4 e5 ~  ?
   
" I. Z6 t6 }# ?8 @* R* T1 e4 p8 C; C0 ^' w7 d$ C! V4 C
- A summary of these guidelines would be, that a number should appear only once on each row, column and a region.
作者: 无忧    时间: 2009-1-26 18:01
翻译成中文就是九宫格。
作者: ycliu1989    时间: 2009-1-31 16:26
数独吧,去年的竞赛题
作者: cherish19880105    时间: 2009-2-1 10:21
应该大家都模拟了这个题目吧·
作者: 一飞冲天    时间: 2011-1-22 16:44

作者: alair002    时间: 2012-2-5 17:23
囧了,下了无数不知道用哪个有用5420702115630222




欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) Powered by Discuz! X2.5