- 博客(11)
- 收藏
- 关注
原创 POJ3233 Matrix Power Series
传送门:http://poj.org/problem?id=3233代码如下:#include #include #include using namespace std;int k,n,m;struct matrix{ int m[31][31]; void init() { memset(m,0,sizeof(m));
2017-04-22 20:14:12 252
原创 HDU2689 Sort it(树状数组求逆序数)
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=2689代码如下:#include #include #include #define maxn 10000using namespace std;int n,tree[maxn];int lowbit(int i){ return i&(-i);}int update(int
2017-04-09 09:40:08 380
原创 POJ3970 Party
PartyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1300 Accepted: 498DescriptionThe CEO of ACM (Association of Cryptographic Mavericks) organization h
2017-04-01 19:11:01 525
原创 POJ2142 The Balance(扩展欧几里得算法)
The BalanceTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 6473 Accepted: 2849DescriptionMs. Iyo Kiffa-Australis has a balance and only two kinds of wei
2017-04-01 11:57:43 675
原创 POJ2115 C Looooops(扩展欧几里得算法)
C LooooopsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 25936 Accepted: 7346DescriptionA Compiler Mystery: We are given a C-language style for loop of
2017-04-01 11:02:29 302
原创 POJ1061 青蛙的约会(扩展欧几里得)
青蛙的约会Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 113074 Accepted: 23054Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰
2017-04-01 09:25:05 454
原创 HDU3074 Multiply game(线段树 单点更新)
Multiply gameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2540 Accepted Submission(s): 894Problem DescriptionTired of play
2017-03-30 16:45:09 236
原创 POJ2488 A Knight's Journey(深搜)
A Knight's JourneyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 44467 Accepted: 15107DescriptionBackground The knight is getting bored of seeing the
2017-03-27 20:51:39 391
原创 POJ2478 Farey Sequence
DescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 < a < b <= n and gcd(a,b) = 1 arranged in increasing order. The first few are F2
2017-03-12 20:11:21 307
原创 POJ1284 Primitive Roots(原根定理)
Primitive Roots DescriptionWe say that integer x, 0 < x < p, is a primitive root modulo odd prime p if and only if the set { (xi mod p) | 1 <= i <= p-1 } is equal to { 1, …, p-1 }. For example, the
2017-03-12 20:02:37 362
原创 欧拉函数的算法实现
欧拉函数:在数论,对正整数n,欧拉函数是小于等于n的数中与n互质的数的数目。 公式:∅(x)=(x)(1-1/p1)(1-1/p2)······(1-1/pn),其中p1···pn是x的素因数。long long phi(long long int n) { long long res=n; for(long long i=2;i*i<=n;i++) {//任何一
2017-03-12 19:25:36 778
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人