摘要:
题意:给定A,B,C,D四个数, A≤x≤B≤y≤C≤z≤D 让我们求出符合条件的三角形的个数 思路:可以通过枚举一条边,其余两条通过计算来获得 具体做法为:枚举一条边,然后将第二条边先定为最大值(即C),然后看看当前的情况能够拿(C,D)范围内的边来凑 假如A B C D 分别为 3 6 9 11 阅读全文
摘要:
最小点覆盖==最大匹配集 我们在计算的时候,用行来匹配列即可 #include<iostream> #include<cstdio> #include<string.h> #include<algorithm> using namespace std; const int maxn=510; int 阅读全文