![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数论
tkj666
这个作者很懒,什么都没留下…
展开
-
bzoj 2190
欧拉函数 先把队伍从对角线分成两块一样的。每一块可以看到的人都是一样的。 所有能被看到的人的坐标都是互质的。例如(6,8)就不能被看到,因为(3,4)挡着 所以直接用欧拉函数找出每一列能被看到的人的个数(右边这一块),求出和然后*2再加上(0,1)(1,0)(1,1)三个点,这就是答案。 代码: #include #include #include using namespace原创 2016-11-25 13:49:28 · 164 阅读 · 0 评论 -
bzoj 2257: [Jsoi2009]瓶子和燃料
题意:n个瓶子中选k个使倒出来的油的最小值最大。 题解:根据裴蜀定理,几个瓶子倒出来的油的最小值肯定是这些瓶子容量的最大公约数。我们标记一下每个瓶子的约数,最大的超过k个的就是答案。 代码:#include<cstdio> #include<cstring> #include<map> using namespace std;int n,k; map<int,int>a;int main() {原创 2017-09-21 11:45:32 · 225 阅读 · 0 评论 -
bzoj 4915: 简单的数字题
数学原创 2017-09-22 15:05:15 · 201 阅读 · 0 评论 -
bzoj 5027: 数学题
exgcd原创 2017-11-05 17:05:14 · 306 阅读 · 0 评论 -
bzoj 3738: [Ontak2013]Kapitał
数论原创 2017-12-02 10:47:13 · 359 阅读 · 0 评论