Problem F:汽车加油 Time Limit:1000MS Memory Limit:65536K Total Submit:1400 Accepted:404 Language: not limited Description 一辆汽车加满油后可行驶n公里。旅途中有若干个加油站。设计一个有效算法,指出应在哪些加油站停靠加油,使沿途加油次数最少。 编程任务: 对于给定的n和k(k <= 10000)个加油站位置,编程计算最少加油次数。 Input 第一行有2 个正整数n和k,表示汽车加满油后可行驶n公里,且旅途中有k个加油站。接下来的1 行中,有k+1 个整数,表示第k个加油站与第 k-1 个加油站之间的距离。第0 个加油站表示出发地,汽车已加满油。第k+1 个加油站表示目的地。 Output 输出最少加油次数。如果无法到达目的地,则输出”No Solution”。 SAmple Input 7 7 1 2 3 4 5 1 6 6 SAmple Output 4
标签: Limit Accepted Language Problem
上传时间: 2016-04-12
上传用户:youth25
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
usb bulk 传输例程。 * The bulkusb driver is a generic function driver, based on the Windows Driver Model (WDM). * Supports Plug and Play(PnP), Power Management(PM), Windows Management Instrumentation (WMI) and the Selective Suspend (SS) features. * This SAmple is based off the selSusp DDK SAmple. Please refer the selSusp SAmple and the DDK docs to understand the handling of PnP, PM, WMI and SS features and implementations. * The USB device used for this SAmple is a generic Intel I82930 USB evaluation board programmed with a simple loopback test using a 64 KB circular buffer. None of the code in the SAmple is specific to this controller chip.
标签: driver function Windows bulkusb
上传时间: 2016-04-25
上传用户:270189020
Hybrid Monte Carlo sampling.SAmpleS = HMC(F, X, OPTIONS, GRADF) uses a hybrid Monte Carlo algorithm to SAmple from the distribution P ~ EXP(-F), where F is the first argument to HMC. The Markov chain starts at the point X, and the function GRADF is the gradient of the `energy function F.
标签: Carlo Monte algorithm sampling
上传时间: 2013-12-02
上传用户:jkhjkh1982
Probability distribution functions. estimation - (dir) Probability distribution estimation. dsamp - Generates SAmples from discrete distribution. erfc2 - Normal cumulative distribution function. gmmsamp - Generates SAmple from Gaussian mixture model. gsamp - Generates SAmple from Gaussian distribution. cmeans - C-means (or K-means) clustering algorithm. mahalan - Computes Mahalanobis distance. pdfgauss - Computes probability for Gaussian distribution. pdfgmm - Computes probability for Gaussian mixture model. sigmoid - Evaluates sigmoid function.
标签: distribution Probability estimation functions
上传时间: 2016-04-28
上传用户:13188549192
flash lite开发 ArcadeHeroes.swf SWF content games/invaders.swf SWF content games/pacman.swf SWF content Arcade1_2nd_edition.SIS Nokia S60 2nd Edition SIS package Arcade1_3rd_edition_signed.sis Nokia S60 3rd Edition signed SIS package Arcade1_2nd_edition.pkg Nokia S60 2nd Edition SIS Package descriptor Arcade1_3rd_edition.pkg Nokia S60 3rd Edition SIS Package descriptor makesis.php PHP script mykey.key SAmple certificate key, created using makekeys.exe mycert.cer SAmple certificate, created using makekeys.exe makekeys.exe Symbian application to create signing keys
上传时间: 2014-01-22
上传用户:hn891122
Addfilter is a command-line application which adds and removes filter drivers for a given drive or volume. It is intended to demonstrate how to insert a filter driver into the driver stack of a device. The SAmple illustrates how to do this by using the SetupDi APIs. The SAmple works on the x86 platform. It has only been tested in a 32-bit environment. Since Addfilter is not a driver, it does not deal with Plug and Play or Power Management.
标签: command-line application Addfilter drivers
上传时间: 2016-05-17
上传用户:xzt
Zword公司的Rabbit2000系列相关文件,包含库Lib和例子SAmple,也有TCP/IP相关应用文件,配套的软件为Dynamic C .
上传时间: 2016-05-26
上传用户:hgy9473
The full Fusion SDK consists of a directory of header files (*.h), the eyeonSystem.lib file and the eyeonScript.lib file. We have also included some SAmple plug‐ins to help get you acquainted with the Fusion plug‐in architecture.
标签: eyeonSystem directory the consists
上传时间: 2016-06-07
上传用户:dancnc
this application program demonstrate programming and simulation of the on-chip CAN (controller area network) interface of the C167/ST10-F168. The SAmple source code can be compiled using keil C166 compiler. To test the program you may use the uVision2 debugger/simulator that is part of keilPK166 package.
标签: application demonstrate programming controller
上传时间: 2013-12-11
上传用户:zmy123