递推
Rocky0429
我愿能朝着太阳生长,做一个温暖的人。
展开
-
POJ 2506-Tiling(递推+大数)
Tiling Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7897 Accepted: 3841 Description In how many ways can you tile a 2xn rectangle by 2x1 or 2x2 tiles?原创 2015-01-07 08:53:01 · 1538 阅读 · 0 评论 -
Photographer (SDUT 2063)
Photographer Time Limit: 1000MS Memory limit: 65536K 题目描述 If two people were born one after another with one second difference and one of them is a child, then the other one is a child too原创 2014-06-27 13:17:13 · 1226 阅读 · 0 评论 -
K-based Numbers (SDUT 2062)
K-based Numbers Time Limit: 1000MS Memory limit: 65536K 题目描述 Let’s consider K-based numbers, containing exactly N digits. We define a number to be valid if its K-based notation doesn’t cont原创 2014-07-01 09:55:45 · 1151 阅读 · 0 评论 -
马拦过河卒 (SDUT 1265)
马拦过河卒 Time Limit: 3000MS Memory limit: 65536K 题目描述 棋盘上A点有一个过河卒,需要走到目标B点。卒行走的规则:可以向下、或者向右。同时在棋盘上C点有一个对方的马,该马所在的点和所有跳跃一步可达的点称为对方马的控制点。因此称之为“马拦过河卒”。棋盘用坐标表示,A点(0,0)、B点(n,m)(n,m为不超过15的整数),同样马原创 2014-06-27 13:03:21 · 1864 阅读 · 0 评论 -
Flag (SDUT 2060)
Flag Time Limit: 1000MS Memory limit: 65536K 题目描述 On the Day of the Flag of Russia a shop-owner decided to decorate the show-window of his shop with textile stripes of white, blue and原创 2014-07-01 09:59:33 · 1145 阅读 · 0 评论 -
母牛的故事 (SDUT 1243)
母牛的故事在SDUT oj 上有两道不一样的题,大家原创 2014-06-27 13:00:45 · 1486 阅读 · 0 评论 -
折线分割平面 (SDUT 1023)
折线分割平面 Time Limit: 1000MS Memory limit: 32768K 题目描述 我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变化,我们要求的是n条折线分割平面的最大数目。比如,一条折线可以将平面分成两部分,两条折线最多可以将平面分成7部分,具体如下所示。 输入 输入数据的第一行是一个整数C,表示测试实例的个数,然后是C 行数据原创 2014-06-27 13:06:39 · 1320 阅读 · 0 评论 -
Orange the Apple (SDUT 2061)
Orange the Apple Time Limit: 1000MS Memory limit: 65536K 题目描述 把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。 输入 第一行是测试数据的数目t(0 输出 对输入的每组数据M和N,用一行输出相应的K。 示例输原创 2014-07-01 09:58:11 · 1324 阅读 · 0 评论 -
骨牌铺方格 (SDUT 1018)
骨牌铺方格 Time Limit: 1000MS Memory limit: 32768K 题目描述 在2×n的一个长方形方格中,用一个1× 2的骨牌铺满方格,输入n ,输出铺放方案的总数. 例如n=3时,为2× 3方格,骨牌的铺放方案有三种,如下图: 输入 输入数据由多行组成,每行包含一个整数n,表示该测试实例的长方形方格的规格是2×n (0 输出 对于每个原创 2014-07-01 10:02:16 · 1416 阅读 · 0 评论 -
三国佚事——巴蜀之危 (SDUT 2058)
三国佚事——巴蜀之危 Time Limit: 1000MS Memory limit: 65536K 题目描述 话说天下大势,分久必合,合久必分。。。却道那魏蜀吴三国鼎力之时,多少英雄豪杰以热血谱写那千古之绝唱。古人诚不我欺,确是应了那句“一将功成万骨枯”。 是夜,明月高悬。诸葛丞相轻摇羽扇,一脸愁苦。原来是日前蜀国战事吃紧,原创 2014-06-27 13:12:45 · 1543 阅读 · 2 评论