A 签到 #include<bits/stdc++.h> using namespace std; ],t[],ans; int main() { scanf("%d%d",&n,&m); ,x;i<=n;i++)scanf(]++; ,x;i<=m;i++)scanf(]++; ans=min(s[],t[])+min(s[],t[]); printf("%d",ans); } B 要求40次,而log(1e6)≍20,也就…
A:求出该行该列各有多少个比其小的取max,该行该列各有多少个比其大的取max,加起来即可. #include<iostream> #include<cstdio> #include<cmath> #include<cstdlib> #include<cstring> #include<algorithm> using namespace std; #define ll long long #define N 1010 char ge…
日常猝死. A:f[i]表示子树内包含根且可以继续向上延伸的路径的最大价值,统计答案考虑合并两条路径即可. #include<iostream> #include<cstdio> #include<cmath> #include<cstdlib> #include<cstring> #include<algorithm> using namespace std; #define ll long long #define N 30001…
A:显然应该让未确定的大小尽量大.不知道写了啥就wa了一发. #include<iostream> #include<cstdio> #include<cmath> #include<cstdlib> #include<cstring> #include<algorithm> using namespace std; #define ll long long #define N 200010 #define inf 100000001…
学了这么久,来打一次CF看看自己学的怎么样吧 too young too simple 1152B. Neko Performs Cat Furrier Transform 题目链接:"https://codeforces.com/contest/1152/problem/B" 题目描述: Cat Furrier Transform is a popular algorithm among cat programmers to create longcats. As one of th…