随笔分类 -  DP

摘要:题目链接:https://vjudge.net/contest/153124 由于是中文题题意就不放了…… A题: 思路:每个点与(0,0)连线的中间点的个数是gcd(a,b),直接暴力会超时,所以换种思路:记录f[i]为gcd=i的个数,f[i]=(n/i)*(m/i)-i的倍数,之后就可以计算啦 阅读全文
posted @ 2017-03-07 22:10 hymscoty 阅读(177) 评论(0) 推荐(1)
摘要:周赛地址:https://vjudge.net/contest/152769#overview A题: 题意:Nikita想选择两门课A和B,使得他想要选的所有学位能被这两门课划分成4个集合,分别是:有AB,有B没A,有A没B,没AB的,并求出这些集合的最大值的最小值。 思路:xjb模拟,才1e6的 阅读全文
posted @ 2017-03-06 20:05 hymscoty 阅读(194) 评论(0) 推荐(1)
摘要: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 阅读全文
posted @ 2017-02-09 09:12 hymscoty 阅读(230) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2016-07-25 21:52 hymscoty 阅读(138) 评论(0) 推荐(0)