02 2011 档案
【poj3259】Wormholes
摘要:DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that is BEFORE you entered the wormhole! Each of FJ's farms comprises N (1 ≤ N ≤ 500) field
阅读全文
【poj1860】Currency ExchangeDescription
摘要:DescriptionSeveral currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these currencies. There can be several points specializing in the same pair of currencies. Each point has its own ex
阅读全文
浅谈排序算法的稳定性
摘要:排序的方法有多种,有稳定和不稳定之分。所谓的稳定性也就是,对于原来的数列中的数会不会被打乱顺序被排列,最后得到的数列中相同的数是否被打乱顺序。例如数列4(1) 5 8 4(2) 1 4(3) 在用不稳定的排序算法排序后数列中的三个4在结果中有可能不在是1,2,3依次的排列了,相同的被打乱了顺序。在题目的实际应用时,如果同时还有一个域记录的是另外的一组数据,以这组数不稳定排序,这组数的不稳定可能会导致另外的一个域中的数被打乱,从而影响结果的正确性。排序的算法主要的有几种,快速排序,堆排序,选择排序,冒泡排序,插入排序等等。平常的程序中快速排序比较常用,在C的函数库中还可以直接调用,比较的方便。下
阅读全文
浙公网安备 33010602011771号