-
這是一個(gè)求數(shù)獨(dú)遊戲的m-file
在matlab的命令窗口
鍵入>> sudo7
或者run sudo7 的m-file
之後在 9x9 的方格內(nèi) 填入 數(shù)獨(dú)的問題
按下 "計(jì)算是否有解" 的功能鍵
若不是存在多組的解,則可以
按下 "顯示結(jié)果" 的功能鍵,
也可以載入作者測(cè)試的"date1"或"date2"
但不可載入及修改"condition"
標(biāo)簽:
m-file
sudo7
matlab
gt
上傳時(shí)間:
2016-11-18
上傳用戶:waizhang
-
void Knight(int i , int j)
{
// printf("%d %dn",i,j)
if (board[i][j] != 0 || i < 0 || i >= Size || j < 0 || j >= Size )
{
return
}
step++
board[i][j]=step
if (step == Size*Size)
{
showboard()
system("PAUSE")
return
}
//DFS
Knight(i-2,j-1) //left
Knight(i-2,j+1)
Knight(i+2,j-1) //right
Knight(i+2,j+1)
Knight(i-1,j-2) //up
Knight(i+1,j-2)
Knight(i+1,j+2) //down
Knight(i-1,j+2)
//
board[i][j]=0
step--
}
標(biāo)簽:
int
Knight
printf
board
上傳時(shí)間:
2014-01-17
上傳用戶:cxl274287265
-
NetGUI v0.4.1
INSTALL Instructions
Pedro de las Heras Quiros
pheras@gmail.com
1. Install netkit (www.netkit.org)
2. Compile src/*java
3. mv src/*class bin
4. Edit and adapt bin/netgui.sh
5. Run bin/netgui.sh
標(biāo)簽:
Instructions
INSTALL
NetGUI
Pedro
上傳時(shí)間:
2013-12-20
上傳用戶:蟲蟲蟲蟲蟲蟲
-
詞法分析程序,可對(duì)以下的C源程序進(jìn)行分析:main() {int a[12] ,sum for(i=1 i<=12 i++) {for(j=1 j<=12 j++)scanf("%d",&a[i][j]) } for(i=12 i>=1 i--){ for(j=12 j>=1 j--){ if(i==j&&i+j==13)sum+=a[i][j] } } printf("%c",sum) }
標(biāo)簽:
分
程序
上傳時(shí)間:
2013-12-26
上傳用戶:skhlm
-
算法介紹
矩陣求逆在程序中很常見,主要應(yīng)用于求Billboard矩陣。按照定義的計(jì)算方法乘法運(yùn)算,嚴(yán)重影響了性能。在需要大量Billboard矩陣運(yùn)算時(shí),矩陣求逆的優(yōu)化能極大提高性能。這里要介紹的矩陣求逆算法稱為全選主元高斯-約旦法。
高斯-約旦法(全選主元)求逆的步驟如下:
首先,對(duì)于 k 從 0 到 n - 1 作如下幾步:
從第 k 行、第 k 列開始的右下角子陣中選取絕對(duì)值最大的元素,并記住次元素所在的行號(hào)和列號(hào),在通過行交換和列交換將它交換到主元素位置上。這一步稱為全選主元。
m(k, k) = 1 / m(k, k)
m(k, j) = m(k, j) * m(k, k),j = 0, 1, ..., n-1;j != k
m(i, j) = m(i, j) - m(i, k) * m(k, j),i, j = 0, 1, ..., n-1;i, j != k
m(i, k) = -m(i, k) * m(k, k),i = 0, 1, ..., n-1;i != k
最后,根據(jù)在全選主元過程中所記錄的行、列交換的信息進(jìn)行恢復(fù),恢復(fù)的原則如下:在全選主元過程中,先交換的行(列)后進(jìn)行恢復(fù);原來的行(列)交換用列(行)交換來恢復(fù)。
標(biāo)簽:
算法
矩陣求逆
程序
上傳時(shí)間:
2015-04-09
上傳用戶:wang5829
-
Title: STL Tutorial and Reference Guide: C++ Programming with the Standard Template Library (2nd Edition)
Author: David R. Musser / Gillmer J. Derge / Atul Saini / Gilmer J. Derge
Publisher: Addison-Wesley
Page: 560
Edition: 2nd edition (March 27, 2001)
Format: PDF
Summary: The Standard Template Library was created as the first library of genetic algorithms and data structures, with four ideas in mind: generic programming, abstractness without loss of efficiency, the Von Neumann computation model, and value semantics. This guide provides a tutorial, a description of each element of the library, and sample applications. The expanded second edition includes new code examples and demonstrations of the use of STL in real-world C++ software development it reflects changes made to STL for the final ANSI/ISO C++ language standard.
標(biāo)簽:
Programming
Reference
Standard
Template
上傳時(shí)間:
2014-01-19
上傳用戶:netwolf
-
給定n 個(gè)整數(shù)a ,a , ,an 1 2 組成的序列, a n i | |£ ,1 £ i £ n。如果對(duì)于i £ j ,有
0 = å
=
j
k i
k a ,則稱序列區(qū)間i i j a , a , , a +1 為一個(gè)零和區(qū)間,相應(yīng)的區(qū)間長度為j-i+1。
標(biāo)簽:
61516
an
整數(shù)
序列
上傳時(shí)間:
2015-07-23
上傳用戶:zhangzhenyu
-
給定n 個(gè)整數(shù)a ,a , ,an 1 2 組成的序列, a n i | |£ ,1 £ i £ n。如果對(duì)于i £ j ,有
0 = å
=
j
k i
k a ,則稱序列區(qū)間i i j a , a , , a +1 為一個(gè)零和區(qū)間,相應(yīng)的區(qū)間長度為j-i+1。
標(biāo)簽:
61516
an
整數(shù)
序列
上傳時(shí)間:
2013-12-21
上傳用戶:偷心的海盜
-
英文版,pdf格式。
詳細(xì)說明:
Title: STL Tutorial and Reference Guide: C++ Programming with the Standard Template Library (2nd Edition)
URL: http://www.amazon.com/exec/obidos/tg/detail/-/0201379236/
ISBN: 0201379236
Author: David R. Musser / Gillmer J. Derge / Atul Saini / Gilmer J. Derge
Publisher: Addison-Wesley
Page: 560
Edition: 2nd edition (March 27, 2001)
Catalog: C++
Format: PDF
Size: 3.8M
Supplier: December
Summary: The Standard Template Library was created as the first library of genetic algorithms and data structures, with four ideas in mind: generic programming, abstractness without loss of efficiency, the Von Neumann computation model, and value semantics. This guide provides a tutorial, a description of each element of the library, and sample applications. The expanded second edition includes new code examples and demonstrations of the use of STL in real-world C++ software development it reflects changes made to STL for the final ANSI/ISO C++ language standard.
標(biāo)簽:
Programming
Reference
Standard
Tutorial
上傳時(shí)間:
2015-09-02
上傳用戶:Breathe0125
-
地圖著色把地圖上的每個(gè)城市抽象為一個(gè)點(diǎn),并給每個(gè)城市編號(hào),,相鄰的城市之間用直線連接。據(jù)此做出鄰接矩陣,若第i個(gè)城市與第j個(gè)城市相鄰,則metro[i][j]=1,否則metro[i][j]=0。
算法:按照編號(hào)從小到大的順序檢查每個(gè)城市,對(duì)每個(gè)城市從1到4使用4種顏色著色,若當(dāng)前顏色可用(即不與相鄰城市顏色相同),則著色;否則測(cè)試下一種顏色。
標(biāo)簽:
地圖
城市
抽象
上傳時(shí)間:
2014-01-14
上傳用戶:450976175