![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Acm
edmond Y
这个作者很懒,什么都没留下…
展开
-
【题解】2020牛客暑假多校训练营(第二场)F-Fake Maxpooling
题面链接 F-Fake Maxpooling 题解 思路 直接求矩阵复杂度为O(nmlog(n))超时,用筛法求lcm时间复杂度为O(nm)(矩阵每个值只计算一次),再用二维单调队列维护最大值 坑点是卡空间,只能开两个N*N的数组,有点毒瘤 代码 #include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #define ll long long using nam原创 2020-07-14 21:39:10 · 128 阅读 · 0 评论 -
Luogu1006 传纸条(4维dp)
题目链接: https://www.luogu.org/problem/P1006 题意: 一个n*m的网格,每个格子有一个值,要求从左上(1,1)找到两条到右下(m,n)不重合的路径且两条路径上格子的值的和最大,每次移动只能向下或向右(0<=m,n<=50),起点(1,1)和终点(m,n)的值为0。 题解: 显然可以用四维dp(当然有些机智的巨佬发现可以用三维dp),一条路径走到(i...原创 2019-08-03 16:30:23 · 162 阅读 · 1 评论 -
【题解】Coderforces round#590(div.3) D(线段树)
题面 You are given a string s consisting of lowercase Latin letters and q queries for this string. Recall that the substring s[l;r] of the string s is the string slsl+1…sr. For example, the substrings o...原创 2019-10-02 22:12:39 · 128 阅读 · 0 评论