12.石油储备

摘要: 原题链接:https://www.acwing.com/problem/content/description/4228/ //简单Flood Fill #include<iostream> #include<cstring> #include<queue> using namespace std; 阅读全文
posted @ 2023-04-03 21:54 skaman 阅读(12) 评论(0) 推荐(0)

11.迷宫问题

摘要: 原题链接:https://www.acwing.com/problem/content/description/1078/ #include<iostream> #include<cstring> #include<vector> using namespace std; #define x fir 阅读全文
posted @ 2023-04-03 21:34 skaman 阅读(18) 评论(0) 推荐(0)

10.起火迷宫

摘要: 原题链接:acwing.com/problem/content/submission/4227/ #include<iostream> #include<cstring> #include<queue> using namespace std; typedef pair<int,int> PII; 阅读全文
posted @ 2023-04-02 20:28 skaman 阅读(19) 评论(0) 推荐(0)

9.点火游戏

摘要: 原题链接:https://www.acwing.com/problem/content/description/4226/ #include<iostream> #include<cstring> #include<queue> using namespace std; const int N=15 阅读全文
posted @ 2023-04-02 17:18 skaman 阅读(22) 评论(0) 推荐(0)

8.罐子

摘要: 原题链接:https://www.acwing.com/problem/content/description/4225/ #include<bits/stdc++.h> using namespace std; struct Operator{ int x,y; }; int a,b,c; int 阅读全文
posted @ 2023-04-02 16:42 skaman 阅读(21) 评论(0) 推荐(0)

7. 洗牌

摘要: 原题链接:https://www.acwing.com/problem/content/description/4224/ #include<bits/stdc++.h> using namespace std; string a,b,c; unordered_map<string,int> dis 阅读全文
posted @ 2023-04-02 12:56 skaman 阅读(31) 评论(0) 推荐(0)

6.质数路径

摘要: 原题:https://www.acwing.com/problem/content/description/4223/ #include<iostream> #include<cstring> #include<queue> using namespace std; const int N=1001 阅读全文
posted @ 2023-03-22 22:02 skaman 阅读(25) 评论(0) 推荐(0)

5.找倍数

摘要: https://www.acwing.com/problem/content/description/4222/ **ab%n=((a%n)b)%n // a*b%n=((a%n)*b)%n #include<iostream> #include<queue> using namespace std 阅读全文
posted @ 2023-03-22 21:59 skaman 阅读(17) 评论(0) 推荐(0)

4. 翻转

摘要: https://www.acwing.com/problem/content/solution/4221/1/ 解法一:枚举第一行状态,递推 #include<iostream> #include<cstring> using namespace std; const int N=20; int n 阅读全文
posted @ 2023-03-15 16:51 skaman 阅读(32) 评论(0) 推荐(0)

3. 抓住那头牛

摘要: https://www.acwing.com/problem/content/1102/ #include<iostream> #include<cstring> using namespace std; const int N=200010; int n,m; int dist[N]; int q 阅读全文
posted @ 2023-03-14 22:02 skaman 阅读(14) 评论(0) 推荐(0)