Sort Poems.cpp

时间:2013-05-02 13:01:51
【文件属性】:
文件名称:Sort Poems.cpp
文件大小:6KB
文件格式:CPP
更新时间:2013-05-02 13:01:51
数据结构 project2 源代码 数据结构基础课程project2——Sort Poems Harry once found an interesting ancient poem written on a long strip of paper. He decided to save this piece of art into his computer by scanning the paper segment by segment. However, over excited as he was, he forgot to name the segment files in the proper order! Harry almost fainted with hundreds of unsorted segment files in hand. Now he comes to you for help. The only clue he has is that there is always a one-line overlap between two consecutive segments. For example, the poem shown in Figure 1 is saved in two files as shown in Figure 2, provided that each file can only contain up to 4 lines. Notice that a blank line is also counted as a line in the second piece of file.

网友评论

  • 这个有点问题,但是改下就好
  • 非常不错的算法
  • 程序中的一些小错误没有避免,不过总的来说程序还是差强人意的!
  • 方法比较繁琐,而且效率不高
  • 值得参考,不过有些小错误。
  • 在我的电脑里面可以运行,楼上说不能运行的是因为程序是从文件里读取输入的而你们没有建立输入文件。程序设计的思想不错,用到了很多种排序和搜索算法
  • 运行不同过,参考下算法
  • 这是浙大数据结构的bonus 程序运行不了,而且方法有些麻烦 不过 分享的精神可嘉
  • 程序运行不通那。。输入测试数据的时候出错
  • 程序有一些小错误。不过思路还是很值得借鉴的,谢谢分享!