登录
首页 » 数据结构 » 程序存储问题:设有n 个程序{1,2,…, n }要存放在长度为L的磁带上。程序i存放在磁带上的长度是Li ,1≤i≤n 程序存储问题要求确定这n 个程序在磁带...

程序存储问题:设有n 个程序{1,2,…, n }要存放在长度为L的磁带上。程序i存放在磁带上的长度是Li ,1≤i≤n 程序存储问题要求确定这n 个程序在磁带...

于 2023-01-10 发布 文件大小:1.44 kB
0 146
下载积分: 2 下载次数: 1

代码说明:

程序存储问题:设有n 个程序{1,2,…, n }要存放在长度为L的磁带上。程序i存放在磁带上的长度是Li ,1≤i≤n 程序存储问题要求确定这n 个程序在磁带上的一个存储方案,使得能够在磁带上存储尽可能多的程序。 编程任务: 对于给定的n个程序存放在磁带上的长度,编程计算磁带上最多可以存储的程序数。 数据输入:由文件input.txt给出输入数据。第一行是正整数n,表示文件个数。接下来的1 行中,有n 个正整数,表示程序存放在磁带上的长度。 结果输出: input.txt output.txt 6 50 5 2 3 13 8 80 20 -program storage problem : There n procedures (1,2, ..., n) to be stored in the length of the L tape. I kept in the proceedings on the tape length is Li, 1 i n storage procedures to seek to establish that n procedures on tape storage of a program that allows the tape to store as much as possible the procedure. Programming tasks : to the n procedures stored in the tape length, calculated programming on tape can store up to the number of procedures. Data input : from the document input.txt given input data. The first line is a positive integer n, said the document number. Following a visit, n is an integer, said procedures stored on tape length. Results output : input.txt output.txt 6 50 5 2 3 13 8 80 20

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

发表评论

0 个回复

  • 模式识别matlab工具箱,包括SVM,ICA,PCA,NN等等模式识别算法,很有参考价值...
    模式识别matlab工具箱,包括SVM,ICA,PCA,NN等等模式识别算法,很有参考价值-pattern recognition Matlab toolbox, including SVM, ICA, PCA, NN pattern recognition algorithms, and so on, of great reference value
    2022-06-18 16:50:03下载
    积分:1
  • 编写一个程序,学生统计信息的果(存储…
    编写一程序,统计学生的成绩信息(保存在文件Score.dat中)。 要求: 1. 能按总分,数学成绩,英语成绩,计算机成绩分别排序 2. 能分别统计数学,英语,计算机中不及格人数 3. 能按学号查找学生,并显示该学生信息。 注 1. 从文件中读入数据以及功能菜单显示已在文件ReadData.c 和Menu.c中给出; 2. 代码的总体结构已在文件Score.c中给出,并定义了一些函数头,但有关函数体代码和一些主程序处理代码要求学生填写,也可以修改函数头; 编译score.c即可 -prepared a procedure, the results of the students statistical information (stored in the document Score.dat). Requirements : 1. According to score, the math and English results, the computer results were 2 ranking. Statistics were able to mathematics, English, Computer failure number three. can search by school, students, and that the student information. Note 1. Read from the file into the data and functions of the menu showed the documentary and Menu.c ReadData.c given; 2. The overall code structure has been the Score.c given, and the definition of some of the first function, However, the body function code and address some main program code requiring students to complete, can also modify function first; compiler can s
    2022-08-20 01:05:35下载
    积分:1
  • ASP+ACCESS 的东西,请看下。我很想下载点东西。谢谢了。
    ASP+ACCESS 的东西,请看下。我很想下载点东西。谢谢了。-ASP+ACCESS
    2023-09-02 09:25:06下载
    积分:1
  • 北京邮电大学软件工程研究生的课程
    北京邮电大学软件工程研究生的课程---数据库设计开发-0-1.1.ppt ... 北京邮电大学软件工程研究生的课程---数据库设计开发-5.2.ppt-Beijing University of Posts and Telecommunications Software Engineering postgraduate courses- Database design and development-0-1.1.ppt ... Beijing University of Posts and Telecommunications Software Engineering postgraduate courses- Database design and development-5.2.ppt
    2023-01-07 18:55:03下载
    积分:1
  • 非常完美地二叉搜索树模板~~~~ 希望大家能够喜欢,并且提出宝贵意见和建议...
    非常完美地二叉搜索树模板~~~~ 希望大家能够喜欢,并且提出宝贵意见和建议-perfectly Binary Search Tree template ~ ~ ~ ~ hope that we can love and made valuable suggestions and recommendations
    2023-06-02 12:30:04下载
    积分:1
  • inventory management system
    库存管理系统将自动存储库存明细信息,并在需要时对库存明细信息进行维护和更新
    2022-04-13 06:24:51下载
    积分:1
  • 图的算法学习(C语言程序)完整版
    图的相关学习,对建立图,图的一系列基本函数的操作,有详细的注释!
    2022-11-15 00:25:02下载
    积分:1
  • 作业图的一些集合 上面有优先遍历 和用链表和堆栈来实现的算法...
    数据结构作业图的一些集合 上面有优先遍历 和用链表和堆栈来实现的算法-data structure of some operations plan sets priority traverse above and the use of linked lists and to achieve the stack algorithm
    2022-03-20 17:00:06下载
    积分:1
  • 字符串搜索
    此代码可以帮助您搜索基于关键词的字符串并根据先后顺序返回字符串。
    2022-04-15 08:17:09下载
    积分:1
  • 宾馆管理信息系统
    宾馆管理信息系统-Hotels Management Information System
    2022-02-04 23:55:41下载
    积分:1
  • 696516资源总数
  • 106611会员总数
  • 19今日下载