摘要: 题意大概就是让你求一下[L,R]中的约数个数是素数的数的个数。 其中1<=L<=R<=1e12,R-L<=1e6. 然后我写了两种做法,第一种是可以直接搞出来L-R的约数个数,然后直接统计一下就好了。 这个的复杂度大致是 O((R-L) * log(R-L)) 第二种就是需要先发现满足条件的数必须只 阅读全文
posted @ 2018-03-20 20:32 蒟蒻JHY 阅读(267) 评论(0) 推荐(0) 编辑
摘要: link: https://loj.ac/problem/6307 最大团转补图的独立集,这样的话只有r[x]<l[y]或者r[y]<l[x],x和y才能连边,所以排序之后乱搞就行了。 需要注意的一点是,如果一个点的l==r的话,需要特殊建点。 阅读全文
posted @ 2018-03-20 19:39 蒟蒻JHY 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 4457: 游戏任务 Description 你正在玩一个名叫Age Of Cities的游戏。由于迫切需要升级你的城市,而且因为你太笨了,只知道做任务可以增加经验值,所以你决定去做游戏任务。你使用了一种顶尖的黑客技术得到了整个游戏的任务描述,发现这个游戏的任务可以分成主任务和附属任务两种,而你只有 阅读全文
posted @ 2018-03-20 16:32 蒟蒻JHY 阅读(347) 评论(0) 推荐(0) 编辑
摘要: Discription You have a rooted tree consisting of n vertices. Each vertex of the tree has some color. We will assume that the tree vertices are numbere 阅读全文
posted @ 2018-03-20 14:34 蒟蒻JHY 阅读(234) 评论(0) 推荐(0) 编辑
摘要: Discription Vasya is studying number theory. He has denoted a function f(a, b) such that: f(a, 0) = 0; f(a, b) = 1 + f(a, b - gcd(a, b)), where gcd(a, 阅读全文
posted @ 2018-03-20 10:27 蒟蒻JHY 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 1123: [POI2008]BLO Description Byteotia城市有n个 towns m条双向roads. 每条 road 连接 两个不同的 towns ,没有重复的road. 所有towns连通。 Byteotia城市有n个 towns m条双向roads. 每条 road 连接 阅读全文
posted @ 2018-03-20 09:37 蒟蒻JHY 阅读(258) 评论(0) 推荐(0) 编辑
摘要: Discription Devu wants to decorate his garden with flowers. He has purchased n boxes, where the i-th box contains fi flowers. All flowers in a single 阅读全文
posted @ 2018-03-20 09:02 蒟蒻JHY 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 题目描述 小 X 自幼就很喜欢数。但奇怪的是,他十分讨厌完全平方数。他觉得这些数看起来很令人难受。由此,他也讨厌所有是完全平方数的正整数倍的数。然而这丝毫不影响他对其他数的热爱。 这天是小X的生日,小 W 想送一个数给他作为生日礼物。当然他不能送一个小X讨厌的数。他列出了所有小X不讨厌的数,然后选取 阅读全文
posted @ 2018-03-20 08:45 蒟蒻JHY 阅读(316) 评论(0) 推荐(0) 编辑