文件名称:slides
-
所属分类:
- 标签属性:
- 上传时间:2013-10-10
-
文件大小:2.8kb
-
已下载: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
DoubleList.h
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.