需對容量為c 的背包進行裝載。從n 個物品中選取裝入背包的物品,每件物品i 的重量為wi ,價值為pi 。對于可行的背包裝載,背包中物品的總重量不能超過背包的容量,最佳裝載是指所裝入的物品價值最高。
標簽: 容量
上傳時間: 2013-12-01
上傳用戶:iswlkje
K均值算法: 給定類的個數K,將N個對象分到K個類中去, 使得類內對象之間的相似性最大,而類之間的相似性最小
標簽: K均值算法
上傳時間: 2014-01-05
上傳用戶:wangyi39
//初始化 initscr() //獲得屏幕尺寸 getmaxyx(stdscr, h, w) //畫背景 for(i=0 i<h i++) for(j=0 j<w j++){ mvaddch(i, j, ACS_CKBOARD) } refresh() //建立窗口 pad = newpad(80, 128) for(i=0 i<80 i++){ char line[128] sprintf(line, "This line in pad is numbered d\n", i) mvwprintw(pad, i, 0, line) } //刷新屏幕 refresh() prefresh(pad, 0, 1, 5, 10, 20, 45) for(i=0 i<50 i++){ prefresh(pad, i+1, 1, 5, 10, 20, 45) usleep(30000) } //等待按鍵 getch()
標簽: getmaxyx initscr stdscr for
上傳時間: 2014-08-30
上傳用戶:龍飛艇
生成Trick文件工具 1.Open command line 2.input tricktest Usage: TrickTest -f -o -i -f source mpeg2 file to trick -o trick output directory -i output file id -m max coding error, default 0 -b max bitrate for trick generate, default 0 mean no limit -s trick buffer block size, must be n*188 -l log file, default c:\tricktest.log example: tricktest -f 黑鷹行動.mpg -o c:\temp -i A -m 1000 -b 3750000 soure file: 黑鷹行動.mpg output directory: c:\temp filename: 000000A,000000A.ff,000000A.fr,000000A.vvx max coding error: 1000 trick generation speed: 3750000 bps a
標簽: TrickTest tricktest command source
上傳時間: 2014-01-23
上傳用戶:水口鴻勝電器
設有由n個不相同的整數組成的數列,記為: a(1)、a(2)、……、a(n)且a(i)<>a(j) (i<>j) 例如3,18,7,14,10,12,23,41,16,24。 若存在i1<i2<i3< … < ie 且有a(i1)<a(i2)< … <a(ie)則稱為長度為e的不下降序列。如上例中3,18,23,24就是一個長度為4的不下降序列,同時也有3,7,10,12,16,24長度為6的不下降序列。程序要求,當原數列給出之后,求出最長的不下降序列。
上傳時間: 2013-12-14
上傳用戶:tonyshao
M i c r o s o f t公司編譯了一個所有可能的錯誤代碼的列表,并且為每個錯誤代碼分配了一個3 2 位的號碼。Wi n E r r o r. h 頭文件包含了M i c r o s o f t 公司定義的錯誤代碼的列 表。
上傳時間: 2013-12-08
上傳用戶:凌云御清風
SensorSimII is the framework of a simulator that I have been working on to study how future sensor networks should operate. the simulator is written in a modular fashion so that it can be adapted to serve a number of needs. However, please remember that it is still a work in progress. This web page is here just to give a glimpse of the approach we ve taken with this simulator. Likewise this web page is simply preliminary information to attempt to answer some of the questions that researchers might have about this project.
標簽: SensorSimII framework simulator working
上傳時間: 2013-12-26
上傳用戶:wsf950131
【問題描述】 在一個N*N的點陣中,如N=4,你現在站在(1,1),出口在(4,4)。你可以通過上、下、左、右四種移動方法,在迷宮內行走,但是同一個位置不可以訪問兩次,亦不可以越界。表格最上面的一行加黑數字A[1..4]分別表示迷宮第I列中需要訪問并僅可以訪問的格子數。右邊一行加下劃線數字B[1..4]則表示迷宮第I行需要訪問并僅可以訪問的格子數。如圖中帶括號紅色數字就是一條符合條件的路線。 給定N,A[1..N] B[1..N]。輸出一條符合條件的路線,若無解,輸出NO ANSWER。(使用U,D,L,R分別表示上、下、左、右。) 2 2 1 2 (4,4) 1 (2,3) (3,3) (4,3) 3 (1,2) (2,2) 2 (1,1) 1 【輸入格式】 第一行是數m (n < 6 )。第二行有n個數,表示a[1]..a[n]。第三行有n個數,表示b[1]..b[n]。 【輸出格式】 僅有一行。若有解則輸出一條可行路線,否則輸出“NO ANSWER”。
標簽: 點陣
上傳時間: 2014-06-21
上傳用戶:llandlu
A simulated lexical analyser for HLL like C,PASCAL etc. I have given a sample text file from which the source code reads the dummy program n analyses it. The program can be extended by adding more.
標簽: simulated analyser lexical PASCAL
上傳時間: 2017-07-19
上傳用戶:redmoons
一款類似百度知道系統的問題解答系統,問題頁面自動生成靜態網頁- M( ]- `+ X0 x 系統特色: + O$ U8 n- [ z# {/ E本系統結合了仿百度知道程序和仿新浪愛問程序的共同優點,設計更加合理 6 X) H8 a5 t9 h& D6 e8 S9 p2 P 問題頁面實時生成靜態頁面,減少系統開銷,更利于搜索引擎的收錄 ! f5 U& N3 J+ B7 I" S完美使用系統緩存,減少數據庫讀取次數 b T |, g1 v9 \" E* Z 完善的后臺管理功能 # u5 C: I- c$ P6 P( H9 S2 w支持問題的附件上傳 . U! K+ k ~) o 對搜索引擎的優化:支持Keywords和Description頁面頭部標簽的自定義 6 ^! h: m- U4 p( z# X支持 JS 代碼的問題調用 t8 E5 ]) b3 M8 x* z提供與動網、oblog、動易實現用戶整合的標準接口 ) {4 \ ` ]1 g1 F8 u
標簽: 百度
上傳時間: 2013-11-28
上傳用戶:ztj182002