文件名称:tennis-ground-allocate
介绍说明--下载内容均来自于网络,请自行研究使用
有一个网球馆,有1到100个场地,设计一个管理系统,用于管理场地的分配与回收,每次可以申请一定长度的连续场地,如果有满足条件的场地则予以分配,如果没有则给予提示,归还场地的时候要提供当时分配的场地号和场地长度。
设计:使用链表来管理可分配的单位,每个链表包括两个数据项:一块连续的空闲场地的第一块场地的号码,该连续场地的长度。指针指向下一块连续的空闲场地。-There is a tennis court, a 1-100 venues, design a management system for managing the site allocation and recovery, each can apply for a certain length of continuous space, if there is space to meet the conditions to be allocated, if not then give prompt return when the venue was assigned to provide venues numbers and field length. Design: Using the list of units that can be assigned to manage each list includes two data items: a contiguous free space first a number of venues, the length of the continuous space. Pointer to the next one continuous free space.
设计:使用链表来管理可分配的单位,每个链表包括两个数据项:一块连续的空闲场地的第一块场地的号码,该连续场地的长度。指针指向下一块连续的空闲场地。-There is a tennis court, a 1-100 venues, design a management system for managing the site allocation and recovery, each can apply for a certain length of continuous space, if there is space to meet the conditions to be allocated, if not then give prompt return when the venue was assigned to provide venues numbers and field length. Design: Using the list of units that can be assigned to manage each list includes two data items: a contiguous free space first a number of venues, the length of the continuous space. Pointer to the next one continuous free space.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
main.cpp
TennisGround.h