動態規劃的方程大家都知道,就是 f[i,j]=min{f[i-1,j-1],f[i-1,j],f[i,j-1],f[i,j+1]}+a[i,j] 但是很多人會懷疑這道題的后效性而放棄動規做法。 本來我還想做Dijkstra,后來變了沒二十行pascal就告訴我數組越界了……(dist:array[1..1000*1001 div 2]...) 無奈之余看了xj_kidb1的題解,剛開始還覺得有問題,后來豁然開朗…… 反復動規。上山容易下山難,我們可以從上往下走,最后輸出f[n][1]。 xj_kidb1的一個技巧很重要,每次令f[i][0]=f[i][i],f[i][i+1]=f[i][1](xj_kidb1的題解還寫錯了)
上傳時間: 2014-07-16
上傳用戶:libinxny
This programme is to control DC motor in a certain speed using PWM. The target speed is "r", it is the speed in 1s. The sample rate is 0.1s, so the actual speed target is "rc"=r/10. The "r" and "rc" are integer, and the range of "r" is from 50 to 100. Keep rc=r/10!!! The array "speed1" and "speed2" are the control result, in 0.1s and 1s. The length of "speed1" is 2400, and "speed2" is 240. The "pw" and "nw" are the parameters of PWM. The test will last 4 min.
標簽: speed programme is control
上傳時間: 2014-11-22
上傳用戶:jyycc
s3c2410 ads下的測試程序移植到 iar ewarm v5.2;包括 Please select function : 0 : Please input 1-14 to select test 1 : Real time clock display 2 : 4 key array test 3 : Buzzer test 4 : ADC test 5 : IIC EEPROM test 6 : Touchpanel test 7 : 3.5# TFT LCD 240*320 test 8 : UDA1341 play audio test 9 : UDA1341 record audio test 10 : IRDA test 11 : SD Card write and read test 12 : COM port ( UART2 ) test
標簽: Please select function s3c2410
上傳時間: 2016-10-01
上傳用戶:225588
The ADC0803 family is a series of three CMOS 8-bit successive approximation A/D converters using a resistive ladder and capacitive array together with an auto-zero comparator. These converters are designed to operate with microprocessor-controlled buses using a minimum of external circuitry. The 3-State output data lines can be connected directly to the data bus.
標簽: approximation converters successive family
上傳時間: 2016-11-20
上傳用戶:libenshu01
Methods void close() int read() reads and returns a chracter. int read(char[] characterArray) populates an array of characters with data. boolean ready() - returns “true” if there is data available. ……
標簽: read characterArray int chracter
上傳時間: 2013-12-18
上傳用戶:小儒尼尼奧
Imperfect C++ Practical Solutions for Real-Life Programming C++, although a marvelous language, isn t perfect. Matthew Wilson has been working with it for over a decade, and during that time he has found inherent limitations that require skillful workarounds. In this book, he doesn t just tell you what s wrong with C++, but offers practical techniques and tools for writing code that s more robust, flexible, efficient, and maintainable. He shows you how to tame C++ s complexity, cut through its vast array of paradigms, take back control over your code--and get far better results.
標簽: Programming Imperfect Practical Solutions
上傳時間: 2014-03-02
上傳用戶:songrui
Description The MUSIC algorithm, proposed by Schmidt, first estimates a basis for the noise subspace and then determines the peaks the associated angles provide the DOA estimates. The MATLAB code for the MUSIC algorithm is sampled by creating an array of steering vectors corresponding to the angles in the vector angles.
標簽: Description algorithm estimates proposed
上傳時間: 2013-12-08
上傳用戶:hgy9473
本文檔介紹了如何使用各種內嵌工具,函數和其他一些小技巧來加強使用matlab的速度和效率,是廣大愛好者必讀的文檔。具體內容請參閱文檔。 Learn how to use the Profiler tool, vectorized functions, and other tricks to writing efficient MATLAB code. This article includes how to convert any array into a column vector, bounding a value without if statements, and repeating/tiling a vector without repmat. Contents: * The Profiler * Array Preallocation * JIT Acceleration * Vectorization * Inlining Simple Functions * Referencing Operations * Numerical Integration * Signal Processing * Miscellaneous Tricks
上傳時間: 2013-12-11
上傳用戶:cuiyashuo
Points in Euclidean space, implemented as double[].Includes simple geometric operations.Uses matrices a matrix is represented as an array of Pnts
標簽: implemented operations Euclidean geometric
上傳時間: 2014-01-05
上傳用戶:xiaoxiang
連接池示例,用一個array存放多個已建立的鏈接
標簽: 連接
上傳時間: 2014-01-16
上傳用戶:源弋弋