摘要: 题目链接http://poj.org/problem?id=1321思路和N皇后问题类似 但是有一点不同的是 这个是只需要摆放K个棋子就可以了所以 我们要做好 两个出口 并且要持续往下一层找AC代码#include #include #include #includ... 阅读全文
posted @ 2018-04-06 22:54 Dup4 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 题目链接http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3930题意 给出一串字符串如果是 ‘+’ ‘-’ ‘*’ ‘/’ 那么需要在前后分别加一个空格如果遇到 纯数字 直接输出如果遇到 a... 阅读全文
posted @ 2018-04-06 21:13 Dup4 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 题目链接http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3865思路一个迷宫题 但是每次的操作数和普通的迷宫题不一样0.按下按钮 即向当前方向盘的方向前进一格 1.往左移动方向盘 2.往右移动... 阅读全文
posted @ 2018-04-06 19:59 Dup4 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 题目链接http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3866思路积分 参考博客 https://blog.csdn.net/u012377575/article/details/45285... 阅读全文
posted @ 2018-04-06 16:31 Dup4 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 题目链接http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3861思路先生成全排列,然后判断哪些情况不符合的,剔除就好了代码中 init() 部分 就是 先指明 哪两个数字之间 是必须有另外一个... 阅读全文
posted @ 2018-04-06 15:29 Dup4 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 题目链接http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3862思路 因为交换次数达到 n + 10 其实我们可以先将他们都重新排序一下 在xoy 坐标系上 从左下角到右上角排序 然后 第2... 阅读全文
posted @ 2018-04-06 15:12 Dup4 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 04-树7 二叉搜索树的操作集(30 point(s))本题要求实现给定二叉搜索树的5种常用操作。 函数接口定义:BinTree Insert( BinTree BST, ElementType X );BinTree Delete( BinTree BST, Ele... 阅读全文
posted @ 2018-04-06 10:30 Dup4 阅读(427) 评论(0) 推荐(0) 编辑
摘要: 05-树8 File Transfer(25 point(s))We have a network of computers and a list of bi-directional connections. Each of these connections all... 阅读全文
posted @ 2018-04-06 09:08 Dup4 阅读(190) 评论(0) 推荐(0) 编辑