动态规划的方程大家都知道,就是 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
上传用户:源弋弋