Location:
Search - sicily 10
Search list
Description: 中山大学ACM网站Sicily上的50题AC源码!效率高,算法好!-Sun Yat-sen University Sicily on the ACM web site AC source 50 title! High efficiency, good algorithm!
Platform: |
Size: 15360 |
Author: G。G。 |
Hits:
Description: 中大oj(Sicily)1029的题目。这道题目主要是看清递归关系式而编即可。注意处理精度。本程序利用四位进位处理精度。-Problem
The rabbits have powerful reproduction ability. One pair of adult rabbits can give birth to one pair of kid rabbits every month. And after m months, the kid rabbits can become adult rabbits.
As we all know, when m=2, the sequence of the number of pairs of rabbits in each month is called Fibonacci sequence. But when m<>2, the problem seems not so simple. You job is to calculate after d months, how many pairs of the rabbits are there if there is exactly one pair of adult rabbits initially. You may assume that none of the rabbits dies in this period.
Input
The input may have multiple test cases. In each test case, there is one line having two integers m(1<=m<=10), d(1<=d<=100), m is the number of months after which kid rabbits can become adult rabbits, and d is the number of months after which you should calculate the number of pairs of rabbits. The input will be terminated by m=d=0.
Output
You must print the n
Platform: |
Size: 1024 |
Author: 冰淇淋 |
Hits:
Description: 中山大学ACM SICILY 1093 air express题目代码-Sun Yat-sen University ACM SICILY 1093 air express subject code
Platform: |
Size: 519168 |
Author: alex |
Hits:
Description: 中大sicily上的1000到1765题中大部分题目的代码,已通过测试。仅供参考只用-Code of some probelms on Sicily forum of SUN-Yat-Sen university,has been tested. For reference only.
Platform: |
Size: 72704 |
Author: tiantian |
Hits:
Description: Sicily上的1002题,主要是为一些初学者设计的-Problem
Given a sequence of consecutive integers n,n+1,n+2,...,m, an anti-prime sequence is a rearrangement of these integers so that each adjacent pair of integers sums to a composite (non-prime) number. For example, if n = 1 and m = 10, one such anti-prime sequence is 1,3,5,4,2,6,9,7,8,10. This is also the lexicographically first such sequence. We can extend the definition by defining a degree danti-prime sequence as one where all consecutive subsequences of length 2,3,...,d sum to a composite number. The sequence above is a degree 2 anti-prime sequence, but not a degree 3, since the subsequence 5, 4, 2 sums to 11. The lexicographically .rst degree 3 anti-prime sequence for these numbers is 1,3,5,4,6,2,10,8,7,9.
Platform: |
Size: 1024 |
Author: 胡乔 |
Hits:
Description: sicily上一些很水很简单的题目,虽然很简单,但是是作者的心血,而且可以换分数-sicily on some very simple topic of water, although very simple, but the hard work of the author, and can change the score
Platform: |
Size: 2048 |
Author: lixiao |
Hits: