設有n個人站成一圈,每個人持有一個密碼(正整數)。現從第t個人開始,按順時針方向“1,2,3,4,…”循環報數,數到m1(第t個人所持密碼)的人出列,然后從出列者的下一個人重新開始報數,數到m2(剛出列者所持密碼)的人又出列,如此重復進行,直到n個人都出列為止。
標簽:
上傳時間: 2014-01-22
上傳用戶:cursor
//初始化 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個值的數組,每個數都小于10000000。然后就將這個數組按從小到大的順序排序。在輸入時,第一行輸入一個整數T,T代表一個有多少個數組要排序。然后就有T組數,每組數的第一行就是數組的大小N。緊跟著就有N行數,第N行就是數組的第N個數。每個數組的輸出就有N行。
上傳時間: 2013-11-25
上傳用戶:sammi
【問題描述】 在一個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
編制計算N (N<50)個偶數之(2+4+6+…)的子程序和接收輸入N及將結果(例如2+4+6=12)顯示的主程序。對鍵盤輸入的字符進行判斷,如果不是數字,顯示提示,輸入兩位數。對輸入的數字進行判斷,如果輸入的數不在1~50之間,提示重新輸入。結束時,顯示提示,按任意鍵退出。在程序的開始顯示自己的學號及姓名(拼音)。編制一個主模塊,編制一個子程序模塊。實現參數的傳遞。
上傳時間: 2017-07-21
上傳用戶:標點符號