文件名称:Jumping the queue

  • 所属分类:
  • 数据结构常用算法
  • 资源属性:
  • 上传时间:
  • 2020-12-31
  • 文件大小:
  • 62.38kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • a1193115156
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

Problem Descr iption
The beginning of a winter break near Spring Festival is always the beginning of a peak period of transportation. If you have ever tried to get a train ticket at that time, you must have witnessed the endless queues in front of every ticket box window. If a guy has seen his friend in a queue, then it is very much likely that this lucky guy might go straight to his friend and ask for a favor. This is called "jumping the queue". It is unfair to the rest of the people in the line, but, it is life. Your task is to write a program that simulates such a queue with people jumping in every now and then, assume that, if one in the queue has several friends asking for favors, he would arrange their requests in a queue of his own. (要求查找时用散列函数完成。)
Input Specification:
Your program must read test cases from a file “input.txt”. The input file will contain one or more test cases. Each test case begins with the number of groups n (1<= n <=100). Then n group descr iptions follow, each one consisting of the number of friends belonging to the group and those people's distinct names. A group is a friend group. People in one group are friend with each other. A name is a string of up to 4 characters chosen from {A, B, ..., Z, a, b, ..., z}. A group may consist of up to 1000 friends. You may assume that there is no one belong to two different groups.
Finally, a list of commands follows. There are three different kinds of commands:
(系统自动生成,下载前可以参看下载内容)

下载文件列表

压缩包 : extend project1.zip 列表
E3-input.txt
E3-input1.txt
bin/
bin/Debug/
bin/Debug/extend project1.exe
extend project1.cbp
extend project1.depend
extend project1.layout
main.c
obj/
obj/Debug/
obj/Debug/main.o

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org