随笔分类 -  数学

摘要:这个题。。。 1 #include <bits/stdc++.h> 2 #define rep(i, a, b) for (int i = a; i <= b; i++) 3 #define drep(i, a, b) for (int i = a; i >= b; i--) 4 #define R 阅读全文
posted @ 2016-02-06 00:29 y7070 阅读(170) 评论(0) 推荐(0)
摘要:number⋅x+product⋅y=1 有整数x,y解的条件是gcd(number, product) == 1. product用线段树维护一下,然后现学了个欧拉函数。 可以这样假如x = p1^a1 * p2^a2 * p3^a3 * ... * pn^an,那么phi(x) = (p... 阅读全文
posted @ 2015-12-29 02:40 y7070 阅读(359) 评论(0) 推荐(0)
摘要:C. Lengthening Stickstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given three sticks ... 阅读全文
posted @ 2015-08-23 15:05 y7070 阅读(401) 评论(0) 推荐(1)