刷题
zhuangdm2012
这个作者很懒,什么都没留下…
展开
-
Sicily马周游问题
简单马周游问题http://soj.sysu.edu.cn/show_problem.php?pid=1152 思路:深搜 代码:#include <stdio.h>#include <string.h>const int tot = 30;int dr[] = {-2, -2, -1, +1, +2, +2, +1, -1};int dc[] = {-1, +1, +2, +2, +1,原创 2016-04-26 08:20:55 · 647 阅读 · 0 评论 -
Sicily1001, 1306, 1438
Sicily算法题原创 2016-04-14 12:44:18 · 399 阅读 · 0 评论 -
Sicily1020,1021,1156
1020 Big Integer1021 Couple1156 Binary Tree原创 2016-03-24 21:41:32 · 375 阅读 · 0 评论 -
算法竞赛入门经典——习题2.5
好久前买了《算法竞赛入门经典》,想着学习算法。一直拖到今天才开始做题…… 所以开了个文件,把这里面的习题做完后都放上来,也方便以后回看。水仙花数 题目:若三位数ABC满足ABC = A3A^3+B3B^3+C3C^3,则称ABC为水仙花数。输出100~999中的所有水仙花数。代码://水仙花数void Daffodil(){ for (int i=1; i<=9; i++)原创 2016-03-17 22:43:27 · 568 阅读 · 0 评论 -
剑指offer系列--1
剑指offer系列–11.复杂链表的复制:每个节点含一个数据项、一个指向下一节点的指针、一个随机指向的指针;struct RandomListNode { int label; struct RandomListNode *next, *random; RandomListNode(int x) : label(x), next(NULL), random(NULL) { }原创 2016-10-07 21:26:33 · 290 阅读 · 0 评论