-
贪恋算法求解01背包
改进的背包问题:给定一个超递增序列和一个背包的容量,然后在超递增序列中选(只能选一次)或不选每一个数值,使得选中的数值的和正好等于背包的容量。
代码思路:从最大的元素开始遍历超递增序列中的每个元素,若背包还有大于或等于当前元素值的空间,则放入,然后继续判断下一个元素;若背包剩余空间小于当前元素值,则判断下一个元素
- 2022-09-27 09:10:02下载
- 积分:1
-
练习程序,问题如下:进行高精度整数的加、减、乘运算。输入两个十进制大整数M和N(M、N最长可达50位),计算运算结果并输出。【输入形式】标准输入上依次分行输入以...
练习程序,问题如下:进行高精度整数的加、减、乘运算。输入两个十进制大整数M和N(M、N最长可达50位),计算运算结果并输出。【输入形式】标准输入上依次分行输入以下内容:1.第一行输入第一个大整数M。M可能带有负号,后面是最长可达50位的数字序列。2.第二行只有一个字符,可以是“+”、“-”、“*”,分别代表加、减、乘三种运算符。3. 第三行输入大整数N,格式与M相同M、N均不带有前缀的多余的0【输出形式】在标准输出上打印运算结果,输出一行字符序列,是大整数M和N和运算结果。如果该运算结果是正数,则直接输出各位数字序列;如果是负数,则首先要输出负号。各位数字紧密输出,不带有前缀的多余的0。-practice procedures, as follows : high-precision integer for the addition, subtraction, multiplication. The importation of two decimal integer big M and N (M, N up to a maximum of 50), the calculated results of operations and output. Entry forms : standard input on the importation of branches were the following : 1. The first line inputs, a large integer M. M may have negative, is back up to 50 digital sequence. 2. Only a second line of characters could be "","-","*", respectively, plus or minus, by three operators. 3. The third line inputs large integer N, M and the same format M, N are not redundant with the prefix 0 output-- in the form of print on standard out
- 2022-02-06 02:31:19下载
- 积分:1
-
Newton迭代法解非线性方程组
编写程序用牛顿迭代法求解下面的非线性方程组:例如 x1 = 0.7 sin(x1) + 0.2 cos(x2); x2 = 0.7 cos(x1)- 0.2 sin(x2);
- 2022-05-14 18:43:17下载
- 积分:1
-
使用python实现搜索和广深(人工智能)
本文介绍了搜索深度和宽度在人工智能中使用的发展。
在实现中使用了Python。
- 2022-04-19 19:55:02下载
- 积分:1
-
一个c++推箱子游戏源码
应用背景
一个简单的推箱子游戏源码
很早的时候写的
游戏虽然没几关
不过直接添加游戏关卡的地图数组就可以了
关键技术
图形绘制
游戏算法
mfc等
- 2022-01-29 01:01:20下载
- 积分:1
-
示例代码
contiene codigo de ejemplo en php,muestra una conexion a mysql mediante la clase mysql conectttt y otros tipos de conexiones mysqla ;mysqlb ;mysqlc ;mysqld
- 2022-02-04 15:36:46下载
- 积分:1
-
偶极天线的Fortran代码
fortran code of dipole antenna
- 2022-03-24 20:19:53下载
- 积分:1
-
ECC加密算法实现C源码
ECC加密算法实现C源码 ECC加密算法实现C源码 ECC加密算法实现C源码
- 2022-03-13 04:36:16下载
- 积分:1
-
ifsviewer CODE
IFSVIEWER CODE in c++, VS2008环境开发 c++研究生课程作业 computer graphic开发
- 2022-02-27 01:50:02下载
- 积分:1
-
writing mathematical function call library, LU decomposition, high Shisaideer it...
自编数学函数调用库,有LU分解法,高斯塞德尔迭代法,追赶法解线性方程组,还有一维和二维的高斯积分公式-writing mathematical function call library, LU decomposition, high Shisaideer iterative method, catching up with the method for solving linear equations, one-and two-dimensional Gaussian integral formula
- 2023-08-06 04:30:03下载
- 积分:1