上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 32 下一页
摘要: B. Polycarp's Practicetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputout... 阅读全文
posted @ 2018-07-17 10:50 张浦 阅读(72) 评论(0) 推荐(0) 编辑
摘要: A. Adjacent Replacementstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputou... 阅读全文
posted @ 2018-07-17 10:46 张浦 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 迷宫类是经典dfs地图数组标记障碍物存在数组表姐已经是否走过边dfs边回溯枚举所有符合题意的组合#include using namespace std;const int MAXN = 6;int N, M, ... 阅读全文
posted @ 2018-07-17 10:40 张浦 阅读(66) 评论(0) 推荐(0) 编辑
摘要: 写出来出现一大堆“yizhong”一看是想复杂了只用沿着一个方向dfs就行用循环可以简化程序#include using namespace std;const int MAXN = 1e2 + 5;string... 阅读全文
posted @ 2018-07-16 18:14 张浦 阅读(320) 评论(0) 推荐(0) 编辑
摘要: dfs刚开始卡了一段纠结怎么用字符串添加再回溯确实没啥思路后来发现把题目完全转换为可以后接的数字矩阵就会简单很多然后dfs对我而言dfs的本质是先写生成全排列的框架然后加上判定条件和回溯即可解决问题#includ... 阅读全文
posted @ 2018-07-16 17:05 张浦 阅读(89) 评论(0) 推荐(0) 编辑
摘要: C. Reorder the Arraytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutpu... 阅读全文
posted @ 2018-07-14 08:48 张浦 阅读(131) 评论(0) 推荐(0) 编辑
摘要: B. Turn the Rectanglestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputout... 阅读全文
posted @ 2018-07-13 23:44 张浦 阅读(117) 评论(0) 推荐(0) 编辑
摘要: A. Romajitime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard o... 阅读全文
posted @ 2018-07-13 23:41 张浦 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 深搜 dfs构思了好久才写出框架,又调了好久思路就是画棋盘加头脑风暴 模拟递归 构建函数 不看题解自己一点点磨出来很有成就感递归框架和选数很像 大体是一样的本质是用递归模拟出所有组合判断输出用二维数组的方式判... 阅读全文
posted @ 2018-07-13 12:42 张浦 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 朴素算法每轮都sort会tle所以要优化 用归并难点在于想明白为什么是归并比赛过程中 输赢持续有序 这是归并的前提条件所以才可以归并#include #include using namespace std;co... 阅读全文
posted @ 2018-07-12 21:56 张浦 阅读(89) 评论(0) 推荐(0) 编辑
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 32 下一页