-
thank you
舞会上男女各排成一队进入舞厅,跳舞时依次从男士队伍和女士队伍的队头各出一个人相互结成舞伴。如果两队的人数不等,则队伍较长中未配对的人员将等待下一轮的舞曲。
要求用程序完成该配对过程的模拟,从键盘输入所有人员的名单,输入格式为“姓名 性别”,并且男女无序,输出所有配对的男女舞伴,如果某队伍中还有人员未配对完,则另外输出所有尚未配对人员名单。
选作内容:
1. 实现下一轮次的继续配对,此时,所有尚未配对的人员应优先予以配对;
2. 将姓名与性别数据存放在文本文件中,直接从文本中读入数据。
实现说明:
1. 总是排在队头的男女相互结成舞伴,具有队列的先进先出特征,因此采用队列来完成;
2. 采用两个队列分别存放男士和女士的姓名,所有输入的人员按照性别依次分解到各自的队列中,然后顺次取出各自的队头元素来配对并输出;
3. 队列类的数据类型可以是字符数组,也可以先实现模板类,再用字符数组来实例化实现。-thank you
- 2022-03-01 16:14:45下载
- 积分:1
-
巧借“它山之石”,VB编写股票行情小工具
巧借“它山之石”,VB编写股票行情小工具-The pretext of " It" s Stone Mountain" , VB preparation of stock quotes Gadget
- 2023-03-18 01:00:03下载
- 积分:1
-
This document introduces the techniques of fast Fourier transform and gives a so...
This document introduces the techniques of fast Fourier transform and gives a source code in C for computing 2D FFT on image data.
- 2022-02-20 16:30:55下载
- 积分:1
-
How to use the dialog effectively
如何有效的使用对话框 -How to use the dialog effectively
- 2022-03-20 00:49:07下载
- 积分:1
-
ATL控件实现视频语音的采集
通过ATL控件实现VFW采集视频音频数据并播放,用户可以利用普通的PC机、标准的视频采集设备(USB摄像头或者视频头+视频采集卡)、耳机和麦克风,注册和加载Activex控件就可以使用了。
- 2022-05-25 06:40:06下载
- 积分:1
-
打印条形码,条形码的运用越来越广泛,可以直接打印39,128等条形码...
打印条形码,条形码的运用越来越广泛,可以直接打印39,128等条形码-Print bar code,it was used more and more vase,which can print the bar code such as 39,128 directly.
- 2022-02-06 08:24:33下载
- 积分:1
-
mir source code
mir source code for new user to study
i hope it is can be used to you
and all one
c++ source code
mir source code for new user to study
i hope it is can be used to you
and all one
c++ source code
- 2022-03-05 02:09:49下载
- 积分:1
-
On the basis of regular expressions tutorial that is very detailed, very suitabl...
有关正则表达式的基础教程,说的很详细,非常适合初学者.-On the basis of regular expressions tutorial that is very detailed, very suitable for beginners.
- 2022-02-07 12:56:47下载
- 积分:1
-
解析BMP文件,并将BMP文件数据转换成C文件。可以应用于窗口…
解析BMP文件,并将BMP文件数据转换成C文件格式。 可适用于Windows CE开发时替换其LOGO画面。-analytic BMP file, and BMP file data into C files. Windows CE can be applied to the development of its replacement when LOGO picture.
- 2022-06-30 05:30:57下载
- 积分:1
-
dm9000eboot中的网卡底层驱动,添加进Eboot就能用
dm9000eboot中的网卡底层驱动,添加进Eboot就能用-dm9000eboot bottom of the card drive will be able to add the use Eboot
- 2023-06-07 00:20:04下载
- 积分:1