登录
首页 » C# » 背包问题:一. 需求分析1.本程序中,表示背包和物品的元素限定为实型,物品的多少不限(可通过改变宏选择适当的数组长度).2.程序由用户和计算机的对话方式执行,在...

背包问题:一. 需求分析1.本程序中,表示背包和物品的元素限定为实型,物品的多少不限(可通过改变宏选择适当的数组长度).2.程序由用户和计算机的对话方式执行,在...

于 2022-07-14 发布 文件大小:6.89 kB
0 92
下载积分: 2 下载次数: 1

代码说明:

背包问题:一. 需求分析1.本程序中,表示背包和物品的元素限定为实型,物品的多少不限(可通过改变宏选择适当的数组长度).2.程序由用户和计算机的对话方式执行,在计算机的提示信息下由用户在键盘上输入规定的运算命令,相应的输入数据和运算结果显示在其后。3.程序执行的命令包括:1) 构造物品数组及相应的标识数组2) 对数组的当前状态求和3) 打印出所有符合要求的结果4.测试数据实型的任意数据均可,不能输入字符型数据-knapsack problem : 1. A needs analysis. This procedure, said the backpack and items elements is limited to type, the number of open-items (available through Acer change the selection of appropriate length of the array). 2. Procedures by the user and computer dialogue approach to the implementation of the computer under the message by the user at the keyboard input on the operation order, the corresponding input data and computing results in the following. 3. Procedures for the implementation of the order include : 1) Construction items array and the corresponding array logo 2) to the current status of the array summation 3) Print out to meet the requirements of all four results. Test data is the type of data can be arbitrary, can not be imported for character data

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • win32wuziqi
    没有实现所功能 请大家多多指点 本来想实现网络对打,但水平有限(not achieve functional Please have a lot to the guidance of 2-network, but is limited)
    2006-05-18 17:16:02下载
    积分:1
  • 定时时钟
    “S7”键复位,时钟显示,数码管的1、2位为秒钟,3、4位为分钟, 通过按键1和2可分别设置时钟的秒钟和分钟值,当按下按键3时,可以暂停/启动;利用按键4可进行定时时钟设置,按一下,则秒钟闪烁,利用按键3设置定时时钟的秒钟值;再按按键4,则分钟闪烁,设置定时时钟的分钟值;按下按键4,则确认定时时钟并退出设置,正常显示时钟。 当时钟值与定时值相等时(此值不为0),数码管快速闪烁报警,延时十秒,然后结束报警正常显示时钟。(When the clock value is equal to the fixed time value (this value is not 0), digital tube quick flashing alarm, delay 10 seconds, and then end the alarm normal display clock.)
    2020-06-20 09:40:01下载
    积分:1
  • Labwindow/CVI popup-dialog
    这个程序简单展示了利用Labwindow/CVI制作对话框的步骤。让弹出的对话框不再变得神秘。(This program shows a simple step uses Labwindow/CVI make dialog. Let the dialog box no longer becomes mysterious.)
    2015-08-26 20:18:31下载
    积分:1
  • SkinnedMesh
    不需要额外建模软件,直接在Unity3D内部为模型添加可控制骨骼 在场景中创建bone 和 bone2两个依托点,bone位运动骨骼bone2为静止骨骼,绑定参考范围通过调整bone 碰撞盒调整(No additional modeling software is required to add controllable bones directly to Unity3D In the scene to create bone and bone2 two relying points, bone position movement bone bone2 for the static bone, binding reference range by adjusting the bone collision box adjustment)
    2017-10-09 13:48:21下载
    积分:1
  • monituihuo
    一个模拟退火算法的c程序,大家可以一起来学习学习(C a simulated annealing process, we can study and learn together)
    2010-12-30 09:52:02下载
    积分:1
  • TC35i短信模块控制程序,通过程序控制接受模块收发短信。
    TC35i短信模块控制程序,通过程序控制接受模块收发短信。
    2022-02-04 12:46:54下载
    积分:1
  • 51
    说明:  51单片机串口控制继电器的C源程序,用电脑控制继电器(51 MCU C source control relay)
    2014-02-21 22:34:42下载
    积分:1
  • Screensaver
    Screen Sacver with OpenGL.
    2015-06-08 05:03:36下载
    积分:1
  • OVT_MSD7C51G_SHEL5_V1.04(2014.10.16)
    有线电视机顶盒完美设计,1080p的设计,一定是商业版本的!(Cable box perfect design, 1080p is designed, it must be commercial version!)
    2015-12-24 13:28:24下载
    积分:1
  • MPU6050测试码
    开始玩四轴的时候,使用STM32F407读写MPU6050。各种尝试始终无法使用,最后怀疑IIC有问题,用示波器看了,波形很好。判断是软件问题,耐心看手册,咨询了别人,均无果····后来担心是芯片焊接温度过高,坏了,最后索性买了个MPU6050小板子,要了程序,一看别人初始化才明白!!!我看错手册,把Power Management 1 的CYCLE  写1了,是MPU6050处入半休眠模式,要数据唤醒,所以有一个考虑程序做参考,比自己没有方向瞎摸索强多了,特地分享给大家
    2022-04-10 15:41:18下载
    积分:1
  • 696518资源总数
  • 106208会员总数
  • 21今日下载