摘要:原题链接:https://www.acwing.com/solution/content/90865/ #include<iostream> #include<queue> #include<cstring> using namespace std; const int N=105,INF=0x3f
阅读全文
摘要:原题链接:https://www.acwing.com/problem/content/description/4230/ #include<iostream> #include<cstring> #include<queue> using namespace std; #define x firs
阅读全文
摘要:原题链接:https://www.acwing.com/problem/content/description/4228/ //简单Flood Fill #include<iostream> #include<cstring> #include<queue> using namespace std;
阅读全文
摘要:原题链接:https://www.acwing.com/problem/content/description/1078/ #include<iostream> #include<cstring> #include<vector> using namespace std; #define x fir
阅读全文
摘要:原题链接:acwing.com/problem/content/submission/4227/ #include<iostream> #include<cstring> #include<queue> using namespace std; typedef pair<int,int> PII;
阅读全文
摘要:原题链接:https://www.acwing.com/problem/content/description/4226/ #include<iostream> #include<cstring> #include<queue> using namespace std; const int N=15
阅读全文
摘要:原题链接: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
阅读全文
摘要:原题链接:https://www.acwing.com/problem/content/description/4224/ #include<bits/stdc++.h> using namespace std; string a,b,c; unordered_map<string,int> dis
阅读全文
摘要:原题:https://www.acwing.com/problem/content/description/4223/ #include<iostream> #include<cstring> #include<queue> using namespace std; const int N=1001
阅读全文
摘要: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
阅读全文
摘要:https://www.acwing.com/problem/content/solution/4221/1/ 解法一:枚举第一行状态,递推 #include<iostream> #include<cstring> using namespace std; const int N=20; int n
阅读全文
摘要: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
阅读全文
摘要:原题:棋盘问题。 #include<iostream> #include<cstring> #include<queue> using namespace std; const int N=110; char g[N][N][N]; int dist[N][N][N]; int n,m,d; str
阅读全文
摘要:##棋盘问题 原题:棋盘问题。 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 ###输入格式 输入含有多组测试数据。 每组数据的第一行是两个正整
阅读全文