USACOTrainning.Ordered Fractions
2010-04-21 08:41
225 查看
这题简单,但看到analysis里面的这个解法真是囧。
We notice that we can start with 0/1 and 1/1 as our ``endpoints'' and recursively generate the middle points by adding numerators and denominators.
Each fraction is created from the one up to its right and the one up to its left. This idea lends itself easily to a recursion that we cut off when we go too deep.
We notice that we can start with 0/1 and 1/1 as our ``endpoints'' and recursively generate the middle points by adding numerators and denominators.
0/1 1/1 1/2 1/3 2/3 1/4 2/5 3/5 3/4 1/5 2/7 3/8 3/7 4/7 5/8 5/7 4/5
Each fraction is created from the one up to its right and the one up to its left. This idea lends itself easily to a recursion that we cut off when we go too deep.
相关文章推荐
- USACO Section 2.1 Ordered Fractions(枚举)
- USACO Ordered Fractions
- USACO-Ordered Fractions
- USACO-Section2.1 Ordered Fractions[其他]
- Usaco Section 2.1 Ordered Fractions
- 【USACO题库】2.1.2 Ordered Fractions顺序的分数.tj
- 【USACO Training】Section 2.1 Ordered Fractions
- USACO Ordered Fractions
- USACO-Section2.1 Ordered Fractions [其他][排序]
- USACO Ordered Fractions
- USACO 2.1 Ordered Fractions (frac1)
- USACO 2.1.2 Ordered Fractions(暴力)
- Usaco 2.1.2 顺序的分数(Ordered Fractions)
- USACO-Section 2.1 Ordered Fractions(排序)
- usaco Ordered Fractions
- USACO Ordered Fractions(枚举)
- usaco Ordered Fractions 顺序的分数(两种解法)
- USACO :Ordered Fractions解题报告
- USACO - Chapter2 Section 2.2 - Ordered Fractions
- USACO 2.1.3 Ordered Fractions