题目解题记录
文章平均质量分 68
cryozwq
这个作者很懒,什么都没留下…
展开
-
AT 杂题选做
AtCoder Regular Contest 081 难度正常的一场 ARC。 A 题感觉有点眼熟,但是不管了,反正是可以秒掉的题。 B 题: 难度:2.0 难在第一步的观察(当然可能非常套路) 由于是 2×n2\times n2×n 的网格,所以不难推出,形状一定是多个竖着的骨牌,然后多个横着的骨牌,然后又是竖着的骨牌… 所以就直接排列组合乱搞竖着横着然后从左往右搞就好了。 C 题: 难度:2.9 惨遭这题误导 ...原创 2021-11-06 13:00:55 · 386 阅读 · 0 评论 -
Codeforces Round #735 (Div. 2) 题解复读
打炸了/kk A Cherry 题意简述:给定一个序列 aaa,求一个区间 $[L,R] $ 使得这个区间的最大值最小值相乘最大。 容易发现,当我们确定了一个区间 [L,L+1][L,L+1][L,L+1] 时无论向左还是向右扩展答案都不优于这个区间,换句话说最优解一定是 [i,i+1](i<n)[i,i+1](i < n)[i,i+1](i<n),直接扫一遍,复杂度 O(n)O(n)O(n)。 B Cobb 题意简述:给定一个序列 aaa,求一组 i,ji,ji,j 使得 i×j−k×(原创 2021-08-02 15:25:33 · 73 阅读 · 0 评论 -
Codeforces Round #736 (Div. 2) 乱扯题解
A Gregor and Cryptography 考虑构造两个数 a,ba,ba,b,使得 pmod a=1p \mod a =1pmoda=1 且 pmod b=1p \mod b =1pmodb=1,那么只需要找到两个整除 p−1p-1p−1 的数,由于 p>5p>5p>5 且 ppp 是质数,所以肯定有至少两个大于 111 的因子。 ...原创 2021-08-02 15:23:03 · 136 阅读 · 0 评论 -
2021-07-29 DP 专练
HDU6212 Zuma #include<iostream> #include<algorithm> #include<cstdio> #include<cstring> #define inf 20000000 using namespace std; const int maxn=305; int t,n,a[maxn],b[maxn],c[maxn],tot=0; char s[maxn]; int dp[2000][2000]; int main(原创 2021-07-29 11:27:24 · 81 阅读 · 0 评论