随笔分类 - DP
摘要:题目链接:https://vjudge.net/contest/153124 由于是中文题题意就不放了…… A题: 思路:每个点与(0,0)连线的中间点的个数是gcd(a,b),直接暴力会超时,所以换种思路:记录f[i]为gcd=i的个数,f[i]=(n/i)*(m/i)-i的倍数,之后就可以计算啦
阅读全文
摘要:周赛地址:https://vjudge.net/contest/152769#overview A题: 题意:Nikita想选择两门课A和B,使得他想要选的所有学位能被这两门课划分成4个集合,分别是:有AB,有B没A,有A没B,没AB的,并求出这些集合的最大值的最小值。 思路:xjb模拟,才1e6的
阅读全文
摘要:C. Mahmoud and a Message time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mahmoud wrote a
阅读全文
摘要:C. Vacations time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Vacations time limit per
阅读全文

浙公网安备 33010602011771号