摘要: 题目描述: http://acm.hdu.edu.cn/showproblem.php?pid=1312 中文大意: 一个长方形的房间,铺着方砖,每块方砖被标记为 # 或黑点. 。 一个人站在起点 @ ,可以上、下、左、右移动,但只能移动到标记为黑点的方砖上,不能移动到标记为 # 的方砖上。 要求: 阅读全文
posted @ 2021-01-18 23:47 狂奔的小学生 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 题目描述: http://acm.hdu.edu.cn/showproblem.php?pid=1312 中文大意: 一个长方形的房间,铺着方砖,每块方砖被标记为 # 或黑点. 。 一个人站在起点 @ ,可以上、下、左、右移动,但只能移动到标记为黑点的方砖上,不能移动到标记为 # 的方砖上。 要求: 阅读全文
posted @ 2021-01-18 22:43 狂奔的小学生 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1.直接使用 stl 中的 next_permutation 实现全排列 #include<bits/stdc++.h> using namespace std; int main() { int a[4] = {2,4,12,3}; sort(a,a+4); do { for(int i=0;i< 阅读全文
posted @ 2021-01-18 13:19 狂奔的小学生 阅读(202) 评论(0) 推荐(0) 编辑