文件名称:slides

  • 所属分类:
  • 数据结构常用算法
  • 资源属性:
  • [C/C++] [源码]
  • 上传时间:
  • 2013-10-10
  • 文件大小:
  • 3kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • 周**
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

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

用双向链表实现了存储数据的功能。使用了两个链表,分别存储编号对应的幻灯片的两个点对应的坐标,以及序号对应的点的坐标。采用蛮力算法,找每个点是否只落在一个幻灯片所在的区域内,如果只有一个则记下该序号,并且删除该幻灯片和序号;如果出现多于一个的情况,立即跳出for循环,进行对下一个序号点的检验工作;如果没有落入任何一个幻灯片,则表明无解,直接输出-1停止。外面使用了一个虚假的while循环,判读条件是现在是否还有幻灯片以及上一次没有进行for循环时的幻灯片数和现在的片数是否相等:如果相等,表明已经不能继续抽出幻灯片,跳出while循环。之后检查此时是否还有幻灯片,如果还有,则表明无解;否则打印出所需要的输出即可。-Achieved using a doubly linked list data storage capabilities. Using the two lists, slides are stored corresponding to the number corresponding to the coordinates of the two points, and the number of coordinates of the corresponding point. Using brute force algorithm to find whether each point falls on a slide only area where, if the only one you write down the serial number, and remove the slide and serial number if there is more than one case, immediately jump out of the for loop for the next serial point inspection if not fall into any one slide, it indicates that no solution, direct output-1 stop. Outside using a while loop false, interpretation condition is whether there is now no slides, and the last number of slides for loop and is equal to the number of pieces now: If they are equal, indicating that the extract has been unable to continue to slide, bounce while loop. After checking whether there slides case, if there is, it indicates that no solution or print out the require
(系统自动生成,下载前可以参看下载内容)

下载文件列表





Slides.cpp

DoubleList.h

相关说明

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

相关评论

暂无评论内容.

发表评论

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

源码中国 www.ymcn.org