-
Question1
说明: C++源代码,递归实现。原问题描述:鼓上蚤时迁到一个山洞里去盗宝,里面有n件宝贝,价值分别是a1,a2......an,并且满足ai大于a1+a2+....+a(i-1)的和。他身上有一个背包,能装的东西最大价值是K,他只能进洞一次,请问他最多能带出多少?
要求:输入K,n,a1,a2......an
输出:他能最多带出的宝物价值
(C++ Source code Recursive achieve. The original problem description: drum when flea盗宝going to move in a cave, there are n pieces of treasure, valued are a1, a2 ...... an, and to meet ai than a1+ A22B !....+ a (i-1) and. Him to have a backpack, things can hold the greatest value is K, he could only hole once, to ask him to bring out the maximum number of? Requirements: Enter K, n, a1, a2 ...... an output: he can bring out the maximum value of the treasures)
- 2008-12-02 21:07:25下载
- 积分:1
-
pvvnn
一种流形学习算法(很好用),包括主成分分析、因子分析、贝叶斯分析,包含收发两个客户端的链路级通信程序。( A fluid manifold learning algorithm (good use), Including principal component analysis, factor analysis, Bayesian analysis, Contains two clients receive link-level communications program.)
- 2017-04-15 21:53:49下载
- 积分:1
-
OV7670
对带FIFO的OV7670模块的驱动,显示设备为LCD。实测可用。(For the driver of the OV7670 module with FIFO, the display device is an LCD. Measured available.)
- 2018-03-17 16:47:07下载
- 积分:1
-
migong
VC实现迷宫问题,用穷举法找出一条路径,用递归形式的算法求得迷宫中所有可能的通路,以方阵形式输出迷宫及其通路.
(VC to achieve maze problems,and use brute-force method to find a path,using the recursive form of algorithm to seek all possible paths in the maze in order to form the output matrix and the path maze.)
- 2010-03-08 11:27:16下载
- 积分:1
-
webApi 读取文件流
webApi 从远处读取文件流, 并生成本地的pdf 文件。
- 2022-05-27 16:21:24下载
- 积分:1
-
uart1
STC51的串口程序,通过STC51工具连接电脑可以用串口助手模拟(STC51 UART)
- 2015-11-03 14:25:00下载
- 积分:1
-
8x8snake
while(1)
{//if(keyenable==1){P1=0x00 P2=0xff }else{P1=0xff P2=0x00 }
for(i=3 i<SNAKE+1 i++)x[i]=100 for(i=3 i<SNAKE+1 i++)y[i]=100 //初始化
x[0]=4 y[0]=4 //果子
n=3 //蛇长 n=-1
x[1]=1 y[1]=0 //蛇头
x[2]=0 y[2]=0 //蛇尾1
addx=0 addy=0 //位移偏移
//k=1
while(1){if(keyenable)break timer0(1) }
while(1)
{timer0(e)
if(knock()){e=SPEED break } //判断碰撞
if((x[0]==x[1]+addx)&(y[0]==y[1]+addy)) //是否吃东西
- 2011-07-09 23:00:46下载
- 积分:1
-
CSimpleApp
美国Delta Tau公司PMAC多轴运动控制卡的VC++示例程序(Delta Tau American companies PMAC multi-axis motion control card VC++ Sample procedures)
- 2021-04-13 19:08:56下载
- 积分:1
-
farContral
远程控制小系统,用VC实现,在VC6.0下编译通过(small remote control system, with VC in the next compile VC6.0)
- 2007-04-17 08:44:19下载
- 积分:1
-
u-boot
uboot--linux -s3c2440-nand_flash,nor_flash,64Msdram.This program is free software(uboot--linux-s3c2440-nand_flash,nor_flash,64Msdram.This program is free software)
- 2013-09-09 11:04:48下载
- 积分:1