算法原理
文章平均质量分 67
YKY
这个作者很懒,什么都没留下…
展开
-
排列组合问题的通用算法
尽管排列组合是生活中经常遇到的问题,可在程序设计时,不深入思考或者经验不足都让人无从下手。由于排列组合问题总是先取组合再排列,并且单纯的排列问题相对简单,所以本文仅对组合问题的实现进行详细讨论。以在n个数中选取m(01. 首先从n个数中选取编号最大的数,然后在剩下的n-1个数里面选取m-1个数,直到从n-(m-1)个数中选取1个数为止。2. 从n个数中选取编号次小的一个数,继续执行1步,直转载 2012-10-16 00:44:29 · 853 阅读 · 0 评论 -
斐波那契与快速幂(一)
In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten terms of the Fibonacci sequence are:0, 1, 1, 2, 3, 5, 8, 13, 21, 34, …An alt转载 2012-11-13 20:53:20 · 1122 阅读 · 0 评论 -
hdu2036
/* 函数: 语法:result=polygonarea(Point *polygon,int N); 参数: *polygon: 多变形顶点数组 N: 多边形顶点数目 返回值: 多边形面积转载 2013-02-16 07:35:31 · 766 阅读 · 0 评论 -
数据结构学习之西南民大OJ<定期更新>
数据结构学习顺序,栈和队列,哈希表,并查集,字典树,堆....优先队列详解:http://blog.csdn.net/kisstears/article/details/8670085优先队列简单的一题:http://218.194.91.48/acmhome/problemdetail.do?&method=showdetail&id=1309#include#include原创 2013-01-05 20:45:15 · 1927 阅读 · 0 评论 -
网络编程
客户端#include#include#include#include#include#include#include#includeint main(int argc,char *argv[]){ int sockfd; char buffer[1024]; struct sockaddr_in server_addr; struct hos原创 2014-03-31 15:25:46 · 811 阅读 · 1 评论