acm HDOJ 1051WoodenSticks Description: There is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodworking machine in one by one fashion. It needs some time, called setup time, for the machine to prepare processing a stick. The setup times are associated with cleaning operations and changing tools and shapes in the machine. The setup times of the woodworking machine are given as follows: (a) The setup time for the first wooden stick is 1 minute. (b) Right after processing a stick of length l and weight w , the machine will need no setup time for a stick of length l and weight w if l<=l and w<=w . Otherwise, it will need 1 minute for setup.
標簽: WoodenSticks Description length wooden
上傳時間: 2014-03-08
上傳用戶:netwolf
TLV1544與TMS320VC5402通過串行口連接,此時,A/D轉換芯片作為從設備,DSP提供幀同步和輸入/輸出時鐘信號。TLV1544與DSP之間數據交換的時序圖如圖3所示。 開始時, 為高電平(芯片處于非激活狀態),DATA IN和I/OCLK無效,DATAOUT處于高阻狀態。當串行接口使CS變低(激活),芯片開始工作,I/OCLK和DATAIN能使DATA OUT不再處于高阻狀態。DSP通過I/OCLK引腳提供輸入/輸出時鐘8序列,當由DSP提供的幀同步脈沖到來后,芯片從DATA IN接收4 b通道選擇地址,同時從DATAOUT送出的前一次轉換的結果,由DSP串行接收。I/OCLK接收DSP送出的輸入序列長度為10~16個時鐘周期。前4個有效時鐘周期,將從DATAIN輸入的4 b輸入數據裝載到輸入數據寄存器,選擇所需的模擬通道。接下來的6個時鐘周期提供模擬輸入采樣的控制時間。模擬輸入的采樣在前10個I/O時鐘序列后停止。第10個時鐘沿(確切的I/O時鐘邊緣,即上升沿或下降沿,取決于操作的模式選擇)將EOC變低,轉換開始。
上傳時間: 2014-12-05
上傳用戶:yepeng139
* first open client.cpp and search for that USER_MSG_INTERCEPT(TeamInfo) over it u add this Code: USER_MSG_INTERCEPT(Health) { BEGIN_READ(pbuf,iSize) me.iHealth = READ_BYTE() return USER_MSG_CALL(Health) } * then we search for int HookUserMsg (char *szMsgName, pfnUserMsgHook pfn) and add this Code: REDIRECT_MESSAGE( Health ) *k now we have the health registered and can read it out i stop this hear know cuz i must thanks panzer and w00t.nl that they helped me with it first time! *ok now we go to int HUD_Redraw (float x, int y) and packing this draw code in it Code:
標簽: USER_MSG_INTERCEPT TeamInfo client search
上傳時間: 2016-01-22
上傳用戶:ynzfm
FIFO電路(first in,first out),內部藏有16bit×16word的Dual port RAM,依次讀出已經寫入的數據。因為不存在Address輸入,所以請自行設計內藏的讀寫指針。由FIFO電路輸出的EF信號(表示RAM內部的數據為空)和FF信號(表示RAM內部的數據為滿)來表示RAM內部的狀態,并且控制FIFO的輸入信號WEN(寫使能)和REN(讀使能)。以及為了更好得控制FIFO電路,AEF(表示RAM內部的數據即將空)信號也同時輸出。
上傳時間: 2016-02-06
上傳用戶:zhoujunzhen
/*SPI規范:Data is always clocked into the device on the rising edge of SCK a-*/ /* nd clocked out of the device on the falling edge of SCK.All instruction-*/ /* s,addresses and data are transferred with the most significant bit(MSB) */ /* first.
上傳時間: 2016-02-19
上傳用戶:遠遠ssad
The first task at hand is to set up the endpoints appropriately for this example. The following code switches the CPU clock speed to 48 MHz (since at power-on default it is 12 MHz), and sets up EP2 as a Bulk OUT endpoint, 4x buffered of size 512, and EP6 as a Bulk IN endpoint, also 4x buffered of size 512. This set-up utilizes the maximum allotted 4-KB FIFO space. It also sets up the FIFOs for manual mode, word-wide operation, and goes through a FIFO reset and arming sequence to ensure that they are ready for data operations
標簽: appropriately The endpoints following
上傳時間: 2013-12-02
上傳用戶:dianxin61
1) Write a function reverse(A) which takes a matrix A of arbitrary dimensions as input and returns a matrix B consisting of the columns of A in reverse order. Thus for example, if A = 1 2 3 then B = 3 2 1 4 5 6 6 5 4 7 8 9 9 8 7 Write a main program to call reverse(A) for the matrix A = magic(5). Print to the screen both A and reverse(A). 2) Write a program which accepts an input k from the keyboard, and which prints out the smallest fibonacci number that is at least as large as k. The program should also print out its position in the fibonacci sequence. Here is a sample of input and output: Enter k>0: 100 144 is the smallest fibonacci number greater than or equal to 100. It is the 12th fibonacci number.
標簽: dimensions arbitrary function reverse
上傳時間: 2016-04-16
上傳用戶:waitingfy
CRC16算法的Java實現,使用方法如下: CRC16 crc16 = new CRC16() byte[] b = new byte[] { // (byte) 0xF0,(byte)0xF0,(byte)0xF0,(byte)0x72 (byte) 0x2C, (byte) 0x00, (byte) 0xFF, (byte) 0xFE, (byte) 0xFE, (byte) 0x04, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00 } for (int k = 0 k < b.length k++) { crc16.update(b[k]) } System.out.println(Integer.toHexString(crc16.getValue())) System.out.println(Integer.toHexString(b.length))
上傳時間: 2014-12-20
上傳用戶:ve3344
本程序要求用戶在控制臺里輸入非終極符,終結符與產生式,然后對用戶輸入的文法進行分析,得出first集 與follow 集,并打印出預測分析表用戶決定是否繼續進行句型分析,如繼續則給出符號分析棧的實現,從而判斷剛輸入的句子是否為符合該文法的句子。 該程序遵循LL(1) 文法FIRST(A)的構造:是A的所有可能推導的開頭終結符或可能的ε FOLLOW(A)是所有句型中出現在緊接A之后的非終結符或“#” 預測分析程序 構造LL(1)分析表 ⅰ,構造文法中所有元素的FIRST和FOLLOW集合 ⅱ,對文法G的每個產生式A->α執行第三步和第四步 ⅲ,對每個終結符a∈FIRST(α),把A->α加至M[A,a] ⅳ,若ε∈FIRST(α),則對任何b∈FOLLOW(A)把A->α加至M[A,b]中 ⅴ,把所有無定義的M[A,a]標上“出錯標志”
上傳時間: 2013-12-27
上傳用戶:jackgao
The Little Green BATS is the first and so far only Dutch team in the 3D simulation league. We are a group of graduate students from the department of AI at the University of Groningen, The Netherlands. Our team name is derived from the fact that the first 3D agents in the league were balls and from the very philosophical observation that Balls Are Truly Spheres (BATS). This abbreviation reminded us of our favorite song Little Green Bag by The George Baker Selection and so the whole team name was born. We entered the competition for the first time at the 10th edition of RoboCup at Bremen, Germany. unfortunately our hard work didn t pay off that time: already in the second round we got eliminated. However, after this we had a good base to build upon and the good time we had at the event and the nice community inspired us to continue and work hard for another year. This turned out to be defiantly worth it, because in 2007 in Atlanta we managed to become vice world champions!
標簽: simulation the Little league
上傳時間: 2014-12-07
上傳用戶:youlongjian0