摘要: 逆元求法参考链接:https://www.cnblogs.com/daybreaking/p/9342060.html 题目链接:https://ac.nowcoder.com/acm/contest/5671/B 题解思路: 1 #include<iostream> 2 #include<algo 阅读全文
posted @ 2020-08-17 19:42 Mr__wei 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 逆元求法参考链接:https://www.cnblogs.com/daybreaking/p/9342060.html 题目链接:https://ac.nowcoder.com/acm/contest/5671/B 题解思路: 1 #in... 阅读全文
posted @ 2020-08-17 19:42 Mr__wei 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 题目链接:传送门 题解: 此题就是一个矩阵的最后一行的数代表底面积,所有数的和为重量,求压强P a/b 8 #include 9 10 using namespace std;11 12 const int MAX_N = 505;13 ... 阅读全文
posted @ 2020-08-17 11:25 Mr__wei 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 题目链接:传送门 题解: 此题就是一个矩阵的最后一行的数代表底面积,所有数的和为重量,求压强P a/b <= (a+c)/(b+d) <= c/d 所以如果选择子矩阵有很多列,则拆成俩个行数不变得更小子矩阵 (也就是竖着切),其中一个肯定是不最坏的情况 所以答案就是寻找单列最大值 1 /* 2 a/ 阅读全文
posted @ 2020-08-17 11:25 Mr__wei 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 示例1 输入 2 1 输出 1 2 说明 The sum of subintervals [1],[1,2][1],[1,2][1],[1,2] both satisfy ≡1(mod2), and their lengths are 1,21,21,2 respectively. 示例2 输入 3 阅读全文
posted @ 2020-08-17 11:17 Mr__wei 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 示例1 输入 2 1 输出 1 2 说明 The sum of subinterval... 阅读全文
posted @ 2020-08-17 11:17 Mr__wei 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://ac.nowcoder.com/acm/contest/5675/E 题解:求最大前缀平均值 1 #include<unordered_map> 2 #include<vector> 3 #include<iostream> 4 #include<cstring> 5 #i 阅读全文
posted @ 2020-08-17 10:58 Mr__wei 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://ac.nowcoder.com/acm/contest/5675/E 题解:求最大前缀平均值 1 #include 2 #include 3 #include 4 #include 5 #include 6 #incl... 阅读全文
posted @ 2020-08-17 10:58 Mr__wei 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 输入 235 输出 1 21 2 4 3 题解: 每次能*2就*2,不行就*3 1 #include 2 #include 3 #inc... 阅读全文
posted @ 2020-08-17 10:47 Mr__wei 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 输入 2 3 5 输出 1 2 1 2 4 3 题解: 每次能*2就*2,不行就*3 1 #include<unordered_map> 2 #include<vector> 3 #include<iostream> 4 #include<cstring> 5 #include<algorithm> 阅读全文
posted @ 2020-08-17 10:47 Mr__wei 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 输入 2(2(2+2(0))+2)+2(2(2+2(0)))+2(2(2)+2(0))+2+2(0) 输出 1315题解:直接附上代码,注释非常清晰 1 #include<iostream> 2 #include<cstring> 3 #include<string> 4 #include<algo 阅读全文
posted @ 2020-08-17 10:35 Mr__wei 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 输入 2(2(2+2(0))+2)+2(2(2+2(0)))+2(2(2)+2(0))+2+2(0) 输出 1315题解:直接附上代码,注释非常清晰 ... 阅读全文
posted @ 2020-08-17 10:35 Mr__wei 阅读(28) 评论(0) 推荐(0) 编辑