- 博客(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
308
原创 HDU2689 Sort it(树状数组求逆序数)
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=2689 代码如下:#include #include #include #define maxn 10000 using namespace std; int n,tree[maxn]; int lowbit(int i) { return i&(-i); } int update(int
2017-04-09 09:40:08
461
原创 POJ3970 Party
Party Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 1300 Accepted: 498 Description The CEO of ACM (Association of Cryptographic Mavericks) organization h
2017-04-01 19:11:01
607
原创 POJ2142 The Balance(扩展欧几里得算法)
The Balance Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 6473 Accepted: 2849 Description Ms. Iyo Kiffa-Australis has a balance and only two kinds of wei
2017-04-01 11:57:43
732
原创 POJ2115 C Looooops(扩展欧几里得算法)
C Looooops Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 25936 Accepted: 7346 Description A Compiler Mystery: We are given a C-language style for loop of
2017-04-01 11:02:29
373
原创 POJ1061 青蛙的约会(扩展欧几里得)
青蛙的约会 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 113074 Accepted: 23054 Description 两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰
2017-04-01 09:25:05
518
原创 HDU3074 Multiply game(线段树 单点更新)
Multiply game Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2540 Accepted Submission(s): 894 Problem Description Tired of play
2017-03-30 16:45:09
291
原创 POJ2488 A Knight's Journey(深搜)
A Knight's Journey Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 44467 Accepted: 15107 Description Background The knight is getting bored of seeing the
2017-03-27 20:51:39
443
原创 POJ2478 Farey Sequence
Description The 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
357
原创 POJ1284 Primitive Roots(原根定理)
Primitive Roots Description We 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
571
原创 欧拉函数的算法实现
欧拉函数:在数论,对正整数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
880
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅