综合材料专题tennis解题报告_第1页
综合材料专题tennis解题报告_第2页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、BOI2002Tennis乒乓球俱乐BOI2002Tennis乒乓球俱乐1000GI (1GI 。假设运动员按照在输入数据中期望比赛场数的1 到N 编号。 SCHEDULE(SCHEDULE( 33NON 和每个定点的度,要求构造一个满足要求的简单图。的点,算法描述和证明要简单一些3大的点连线,如AN 和每个定点的度,要求构造一个满足要求的简单图。的点,算法描述和证明要简单一些3大的点连线,如AB连线,但是已知解中,A,B 间却没有连线,相反的, A,C之间却有边相连,且D(B)D(C) (D表示定点的度 ZZBCA-CC-Z,B-ZA-B空间复杂度:O(N2),可以降至O(N)。程序1122

2、21 2121TennisThe Matchball tennis club is organizing a “game interest week” to attract new players to the club. As one of the attractions, they have asked some star players to play a few demo games. Each star has indicated the number of games he or she is willing to play. The organizers want the sta

3、rs to have some fun as well, thus they want to schedule the games so that TennisThe Matchball tennis club is organizing a “game interest week” to attract new players to the club. As one of the attractions, they have asked some star players to play a few demo games. Each star has indicated the number

4、 of games he or she is willing to play. The organizers want the stars to have some fun as well, thus they want to schedule the games so that no two players meet thanoncewith eachYour task is to writea program to help themmatch the players into pairs so thateach player his or her desired number of ga

5、mes and does not play twice or more against any other player. Of course, no player may play against himself or herself.InputOnthe firstline ofthe inputfile tennis.inisthe numberofplayers N(2=N=1000)andonfollowing N lines is the desired number of games to GI 1 N ) for each Assumethattheplayersarenumb

6、eredfrom1toNintheorderoftheirwishesintheinputOutputOn the first line of the output file tennis.outwrite NO SCHEDULE if itis notpossible to create schedulesothatthewishesofallplayersaresatisfied,orSCHEDULEifitis If a schedule exists, write it out on the following N lines. On each line write the indices of opponents for player whose desired number of games was indicated on the corresponding input line. On each line the indices must be in increasing order and separated by spaces. If solutionsexist,outputanyoneof33NO122In this task, a program receives points In this task, a

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论