-
0/1背包java实现
import java.util.Scanner;
public class Packsack{
Scanner sc=new Scanner(System.in);
int n;//物品个数
int m;//背包最大容量
int w[];//存储每个物品的重量
int v[];//存储每个物品的价值
int Max[][];//行表示前i个物品,列表示容量j,该值为将前i个物品装入容量为j的最大价值
public Packsack(){
System.out.println("please input the number of goods");
n=sc.nextInt
- 2022-04-13 13:49:39下载
- 积分:1
-
著名的3SAT问题 用蒙特卡罗算法实现的!
著名的3SAT问题 用蒙特卡罗算法实现的!-famous 3SAT uses Monte Carlo algorithm!
- 2022-12-21 14:20:03下载
- 积分:1
-
二元关系传递性判断
这是离散数学中的二元关系传递性的判断。总之就是能判断二元关系传递的,用C++写的。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
- 2022-01-25 18:11:27下载
- 积分:1
-
这事辛普森积分算法实例
这事辛普森积分算法实例-Simpson Integration Algorithm for example
- 2022-08-21 13:38:28下载
- 积分:1
-
缓冲区空间分析
该文件代码是基于ARCGIS的二次开发,里面实现了缓冲区分析,前提是需要安装ARCGIS二次开发工具包,所以,需要使用的可以从这里下载,试用。c#该源码实现了GIS中点、线、面的缓冲区分析。有距离缓冲区、属性值缓冲区和分级缓冲区三种。
- 2023-05-23 20:25:02下载
- 积分:1
-
Adboost 的人脸检测
ApplyDetector.m BoostingAlg.m CalcIntegralImage.m ComputeBoxSum.m ComputeFeatures.m 等20段代码
- 2022-03-25 01:13:19下载
- 积分:1
-
入口匝道交通流量
为了观察交通计划的匝道系统在仿真实验中更多的羽毛真正,四个不同的 lanechanging 规则介绍了基于点的安全距离。实验结果表明车道变化规律,对匝道系统交通流所没有的重要影响。该规则没有安全距离能使经济性的上坡道部分获取其最大值,同时容量 ofupstream 和下游的主要道路都获取击落 ;ruleconsidering 向前和向后安全-距离能使上游、 下游部分和整个系统得到其最大的价值。
- 2022-01-31 21:02:38下载
- 积分:1
-
这是一个简单的演示如何评价文本的数学表达式
This a simple demo of how to evaluate mathematical expressions in text
format, including provision for variables and functions. The code consists of
three simple classes: 1) Calc - which does the main calculations, 2) Stack -
which is used to push and pop intermediate operators and numbers and 3)
Symbol Table. The symbol table is a collection of calc symbols, a type structure
consisting of various elements, including the expression name, function name,
and the final value of the expression The evaluation procedure is done in three
steps: 1) simplify the expression by removing all the elements within () and
storing them in subexpressions within the symbol table. 2) Each of these sub
expressions are then converted to RPN format (Reverse polar notation) and
evaluated 3) Finally, the main expression is converted to RPN and evaluated-This is a simple demo of how to evaluate mathematical expressions in text
format, including provision for variables and functi
- 2022-02-20 06:26:41下载
- 积分:1
-
实现base64编解码运算,实现base64编解码运算
实现base64编解码运算,实现base64编解码运算-BASE64 CODEC, achieving base64 CODEC
- 2022-04-15 22:26:11下载
- 积分:1
-
神经元算法的源程序
神经元算法的实现方法和应用,通过神经元算法生成。txt文件,描述算法过程
- 2023-07-30 02:05:03下载
- 积分:1