![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
codeforces
文章平均质量分 91
ccsu_zhaobo
这个作者很懒,什么都没留下…
展开
-
Educational Codeforces Round 106 (Rated for Div. 2)
Educational Codeforces Round 106 (Rated for Div. 2)Educational Codeforces Round 106 (Rated for Div. 2)D. The Number of Pairs题意:给定 c,d,xc, d, xc,d,x,让你求有多少对a,ba, ba,b可以让,c∗lcm(a,b)−d∗gcd(a,b)=xc*lcm(a, b) - d * gcd(a, b) = xc∗lcm(a,b)−d∗gcd(a,b)=x题解:设原创 2021-03-19 13:11:19 · 183 阅读 · 0 评论 -
Codeforces Round #695
Codeforces Round #695 (Div. 2)B. Hills And Valley题解:模拟改变每个数, 对于a[i]a[i]a[i]计算 变成 a[i−1]a[i - 1]a[i−1]的贡献, 和 a[i+1]a[i + 1]a[i+1]的贡献,枚举每个数, 最后取最优的就好了。#include<bits/stdc++.h>using namespace std;const int N = 3e5 + 7;int a[N], n;int cal(int pos原创 2021-01-12 21:52:32 · 100 阅读 · 0 评论 -
Codeforces Round #683 (Div. 2, by Meet IT
Codeforces Round #683 (Div. 2, by Meet IT)D. Catching Cheaters题意:给你一个字符串 sss,和 ttt 问 s,ts, ts,t的所有子串中 最长公共子序列 * 4 减去 两个子串的长度的最大值是多少。题解:考虑暴力:用 dfs进行模拟, 如果当前 s[i]==t[j]s[i] == t[j]s[i]==t[j] 那么这个字符产生贡献有两种第一种是 取 i与j的字符, 那么此时的答案是 + 4 -1 -1, 然后 i + 1, j原创 2020-11-16 14:05:52 · 163 阅读 · 0 评论