- 博客(53)
- 收藏
- 关注
原创 HDU 5950(Recursive sequence)
Recursive sequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 29 Accepted Submission(s): 19Problem DescriptionFarmer John
2016-10-30 19:25:49
2981
原创 POJ 1163(数字三角形问题)
The TriangleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 45912 Accepted: 27775Description73 88 1 02 7 4 44 5 2 6 5(Figure
2016-10-07 13:28:33
452
原创 POJ 1050(最大子矩阵和)
To the MaxTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 47107 Accepted: 24952DescriptionGiven a two-dimensional array of positive and negative integer
2016-10-07 12:08:41
419
原创 HDU 1231(最大子段和)
最大连续子序列Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 28892 Accepted Submission(s): 13096Problem Description给定K个整数的序列{ N
2016-10-07 11:10:31
407
原创 POJ 1458(最长公共子序列)
Common SubsequenceTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 48407 Accepted: 19946DescriptionA subsequence of a given sequence is the given sequenc
2016-10-06 21:12:51
387
原创 POJ 1651(矩阵连乘)
Multiplication PuzzleTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8753 Accepted: 5478DescriptionThe multiplication puzzle is played with a row of car
2016-10-06 20:08:28
430
原创 FOJ 1683(构造矩阵求递推式的前N项和)
Problem 1683 纪念SlingShotAccept: 564 Submit: 1975Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description已知 F(n)=3 * F(n-1)+2 * F(n-2)+7 * F(n-3),n>=3,其中F(0)=1,F(1)=3
2016-10-05 17:34:51
363
原创 CF 185A(递推式构造矩阵求解)
A. Planttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDwarfs have planted a very interesting plant, whic
2016-10-05 16:25:50
388
转载 根据递推公式构造系数矩阵用于快速幂
简单的例子Fibonacci数列考虑Fibonacci数列,F(n)=F(n−1)+F(n−2)将右边两项看做是一个列向量的形式,令 Xn−1={Fn−1Fn−2}很容易得到Xn的形式,即Xn={FnFn−1}现在的任务就是找到一个系数矩阵A,使得AXn−1=Xn,且A需与n无关。如果能够找到这个A,则易知An−1X1=Xn,
2016-10-05 12:55:37
553
原创 HDU 2855(由递推式构造矩阵+矩阵快速幂)
Fibonacci Check-upTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1356 Accepted Submission(s): 778Problem DescriptionEvery AL
2016-10-05 12:23:39
548
原创 POJ 2891(线性同余方程组的求解)
Strange Way to Express IntegersTime Limit: 1000MS Memory Limit: 131072KTotal Submissions: 14494 Accepted: 4743DescriptionElina is reading a book written by Ruji
2016-10-04 21:36:09
790
原创 POJ 1006(中国剩余定理)
BiorhythmsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 130708 Accepted: 41657DescriptionSome people believe that there are three cycles in a person's
2016-10-04 15:33:54
333
原创 POJ 1061(不定方程的最小正整数解)
青蛙的约会Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 108469 Accepted: 21745Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰
2016-10-04 14:31:55
3530
原创 C. Line(扩展欧几里得求不定方程的解)
C. Linetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA line on the plane is described by an equation Ax +
2016-10-04 12:50:43
491
原创 CodeForces 375(div2)
A. The New Year: Meeting Friendstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are three friend livi
2016-10-04 11:41:27
574
原创 HDU 2588(欧拉函数的应用)
GCDTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1788 Accepted Submission(s): 895Problem DescriptionThe greatest common div
2016-10-03 11:19:54
378
原创 POJ 1845(Sumdiv) 数论好题
SumdivTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 19733 Accepted: 4987DescriptionConsider two natural numbers A and B. Let S be the sum of all nat
2016-10-02 21:37:07
770
原创 D. Soldier and Number Game
D. Soldier and Number Gametime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo soldiers are playing a game.
2016-10-02 17:28:49
375
原创 HDU 5666(二进制模拟乘法)
SegmentTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1560 Accepted Submission(s): 577Problem Description Silen Aug
2016-10-02 15:40:55
569
1
原创 HDU 5833
Zhu and 772002Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1521 Accepted Submission(s): 542Problem DescriptionZhu and 7720
2016-10-02 00:32:58
678
原创 CodeForces 374(div2)
C题是个DP啊,可怜我昨晚在那苦苦暴力了,课上刚学的DP,真是对不住算法课老师。。A. One-dimensional Japanese Crosswordtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutput
2016-10-01 16:28:01
458
原创 高斯消元模板
开关问题Time Limit: 1000MS Memory Limit: 30000KTotal Submissions: 7752 Accepted: 3047Description有N个相同的开关,每个开关都与某些开关有着联系,每当你打开或者关闭某个开关的时候,其他的与此开关相关联的开关也会相应地发生变化,即这些相联系
2016-09-30 17:25:49
585
转载 大数模板
#define MAXN 9999#define MAXSIZE 10#define DLEN 4class BigNum{ private: int a[500]; //可以控制大数的位数 int len; //大数长度public: BigNum(){ len = 1;memset(a,0,sizeof(a)); } //构造函数 BigNum
2016-09-25 21:45:21
244
原创 LCIS
LCISTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 499 Accepted Submission(s): 229Problem DescriptionAlex has two sequences
2016-09-25 20:58:17
331
原创 CodeForces 373(div2)
本宝宝昨晚从健身房出来兴致来潮决定干这场的codeforces,开学之后好多事,一直没时间熬到深夜凌晨去打,一是身体受不了,二是不想去打扰舍友。昨晚时间早,说干就干,真是日狗,上来第一道刚交上去过了,没3分钟就被人家hack掉了,只能抓紧去修bug。第二道第一发错了,好在第二发过了。第三道一个大模拟,我少考虑了一种情况,交上去竟然过了,我那一个高兴啊,本以为能涨分了,不幸的是,回来发现重判的时候挂
2016-09-24 10:34:05
727
原创 矩阵快速幂
FibonacciTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 13372 Accepted: 9517DescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn
2016-09-23 19:48:12
239
原创 1119. Pre- and Post-order Traversals (30)
1119. Pre- and Post-order Traversals (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Special作者CHEN, YueSuppose that all the keys in
2016-09-22 16:46:51
855
原创 1118. Birds in Forest (25)
1118. Birds in Forest (25)时间限制150 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSome scientists took pictures of thousands
2016-09-22 16:45:14
505
原创 1117. Eddington Number(25)
1117. Eddington Number(25)时间限制250 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueBritish astronomer Eddington liked to ride
2016-09-22 16:43:43
860
原创 1116. Come on! Let's C (20)
1116. Come on! Let's C (20)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, Yue"Let's C" is a popular and fun programmin
2016-09-22 16:41:42
353
原创 整数因子分解问题
//整数因子分解问题//局限性特别大,数据量一大,就完蛋了!! #include #include #include #include #include using namespace std;typedef long long int ll;ll ans; void solve(ll N){ if(N==1) ans++; for(int i=2; i<=N;
2016-09-21 20:33:46
540
原创 HDU 2067
小兔的棋盘Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9336 Accepted Submission(s): 4841Problem Description小兔的叔叔从外面旅游回来给她带来了一个礼
2016-09-21 20:00:20
325
原创 集合划分问题
2630: 集合划分问题 时间限制(普通/Java):1000MS/10000MS 内存限制:65536KByte总提交: 152 测试通过:103描述n(0{{1},{2},{3},{4}}{{1,2},{3},{4}}{{1,3},{2},{4}}{{1,4},{2},{3}}{{2,3},
2016-09-21 18:27:12
853
原创 排列的字典序问题
Problem 1571 排列的字典序问题Accept: 310 Submit: 1095Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Descriptionn个元素{1,2,...,n}有n!个不同的排列。将这n!个排列按字典序排列并编号为0,1,...,n!-1。每个排列的编号为其字典序值
2016-09-20 16:16:22
1988
原创 有重复元素的排列问题
Description设R={ r1, r2, ……, rn }是要进行排列的n个元素。其中元素r1 ,r2 ,……,rn可能相同。试设计一个算法,列出R的所有不同排列。给定n以及待排列的n个元素。计算出这n个元素的所有不同排列。Input输入数据的的第1行是元素个数n,1≤n≤500。接下来的1行是待排列的n个元素。Output将计算出的n个元素的
2016-09-19 22:01:58
835
原创 半数集问题
半数集问题时间限制(普通/Java) : 1000 MS/ 3000 MS 运行内存限制 : 65536 KByte总提交 : 143 测试通过 : 71 比赛描述给定一个自然数n,由n开始可以依次产生半数集set(n)中的数如下。(1) n∈set(n);(2) 在n的左边加上一个自然数,但该自然数不能超过最近添
2016-09-19 11:21:08
1015
转载 HDU 1997
汉诺塔VIITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1567 Accepted Submission(s): 1033Problem Descriptionn个盘子的汉诺塔问题的最少移动次数是2^n-1,即在移动过程中会产
2016-09-16 10:32:14
375
原创 HDU 1996
汉诺塔VITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2411 Accepted Submission(s): 1748Problem Descriptionn个盘子的汉诺塔问题的最少移动次数是
2016-09-15 21:25:20
414
原创 HDU 1995
汉诺塔VTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4216 Accepted Submission(s): 2550Problem Description用1,2,...,n表示n个盘子,称为
2016-09-15 21:06:42
592
原创 HDU 1207
汉诺塔IITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7410 Accepted Submission(s): 3677Problem Description经典的汉诺塔问题经常作为一个递归的经
2016-09-15 20:30:36
390
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人