随笔分类 -  BZOJ

摘要:矩阵BSGS,同样处理即可。 有一个优化可以更快,判断矩阵相等可以$O(n)$。列矩阵的使用。 c++ include using namespace std; typedef long long ll; const int N=71; int n,m,P; struct matrix{ int a 阅读全文
posted @ 2017-12-11 11:01 foreignbill 阅读(186) 评论(-1) 推荐(0)
摘要:一个矩阵,可以横着切S刀,竖着切R刀,求小矩阵和最大的最小是多少。 二分答案,dfs出竖着切的,横着贪心check。 c++ include using namespace std; typedef long long ll; const int maxn = 25; ll a[maxn][maxn 阅读全文
posted @ 2017-11-29 16:16 foreignbill 阅读(233) 评论(0) 推荐(0)