![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
周赛系列
安青学习之路
这个作者很懒,什么都没留下…
展开
-
2021-08-23
AcWing第 13 场周赛 (3812. 机器人走迷宫) 题目链接 思路:一共有0,1,2,3四种指令,随机构成上下左右四个方向,那么全排列四种指令一共有24种可能,然后将这24种可能分别代入指令中即可。 PS:(如果对全排列不熟悉可以做以下题目) #include <iostream> #include <algorithm> #include <vector> using namespace std; const int N = 55; char s[N][N];原创 2021-08-23 16:55:59 · 31 阅读 · 0 评论 -
Acwing第 13 场周赛( AcWing 3811. 排列)
题目链接 思路1: 将数字第一个与最后一个交换,第二个和倒数第二个交换,如果总数为奇数,那么最中间那个则没有交换,用中间这个与最后一个交换即可。 #include<iostream> using namespace std; int main() { int t; cin >> t; while(t --){ int n; cin >> n; int a[n+1]; for(int i原创 2021-08-23 15:16:44 · 138 阅读 · 2 评论