Description Squares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to draw on, for all of his paper was filled with squares and r…
原题链接:http://poj.org/problem?id=1664 思路:苹果m个,盘子n个.假设 f ( m , n ) 代表 m 个苹果,n个盘子有 f ( m , n ) 种放法. 根据 n 和 m 的关系可以进一步分析: 特殊的 n = 1 || m = 1 || n = 0 时只有一种方法 当 m < n时,即使苹果每个盘子放一个也没法放满所有盘子,题目允许有的盘子空着不放,所以我们可以将空盘子去掉,即 f ( m , n ) = f ( m , m ) 当 m >= n时,这时…