上一页 1 ··· 119 120 121 122 123 124 125 126 127 ··· 164 下一页
  2018年3月19日
摘要: H - May Day HolidayAs a university advocating self-learning and work-rest balance, Marjar University h... 阅读全文
posted @ 2018-03-19 11:47 蔡军帅 阅读(92) 评论(0) 推荐(0)
摘要: Beauty of Array Edward has an array A with N integers. He defines the beauty of an array as the summat... 阅读全文
posted @ 2018-03-19 11:44 蔡军帅 阅读(119) 评论(0) 推荐(0)
摘要: Beauty of Array Edward has an array A with N integers. He defines the beauty of an array as the summation of all distinct integers in the array. Now E 阅读全文
posted @ 2018-03-19 11:44 蔡军帅 阅读(638) 评论(0) 推荐(0)
摘要: 山区建小学 题目描述 政府在某山区修建了一条道路,恰好穿越总共m个村庄的每个村庄一次,没有回路或交叉,任意两个村庄只能通过这条路来往。已知任意两个相邻的村庄之间的距离为di(为正整数),其中,0<i<m。为了提高山区的文化素质,政府又决定从m个村中选择n个村建小学(设0<n≤m<500)。请根据给定 阅读全文
posted @ 2018-03-19 11:20 蔡军帅 阅读(1373) 评论(0) 推荐(0)
  2018年3月18日
摘要: Hanoi双塔问题时间限制: 1 Sec 内存限制: 128 MB提交: 10 解决: 4[提交][状态][讨论版][命题人:外部导入]题目描述 给定A,B,C三根足够长的细柱,在A柱上放有2n个中间... 阅读全文
posted @ 2018-03-18 13:11 蔡军帅 阅读(142) 评论(0) 推荐(0)
摘要: Hanoi双塔问题 题目描述 给定A,B,C三根足够长的细柱,在A柱上放有2n个中间有空的圆盘,共有n个不同的尺寸,每个尺寸都有两个相同的圆盘,注意这两个圆盘是不加区分的(下图为n=3的情形)。现要将 这些国盘移到C柱上,在移动过程中可放在B柱上暂存。要求: (1)每次只能移动一个圆盘; (2) A 阅读全文
posted @ 2018-03-18 13:11 蔡军帅 阅读(1232) 评论(0) 推荐(0)
摘要: 组合的输出 题目描述 排列与组合是常用的数学方法,其中组合就是从n个元素中抽出r个元素(不分顺序且r≤n),我们可以简单地将n个元素理解为自然数1,2,…,n,从中任取r个数。 现要求你用递归的方法输出所有组合。 例如n=5,r=3,所有组合为: 1 2 3 1 2 4 1 2 5 1 3 4 1 阅读全文
posted @ 2018-03-18 12:33 蔡军帅 阅读(210) 评论(0) 推荐(0)
摘要: 题解: 列举每一种3的倍数的组合,开始先求出3条边的可行解,则 六条边的可行解可以由两个三条边得来。 详见代码解析#include using namespace std; int a[22]... 阅读全文
posted @ 2018-03-18 11:54 蔡军帅 阅读(108) 评论(0) 推荐(0)
摘要: 题解: 列举每一种3的倍数的组合,开始先求出3条边的可行解,则 六条边的可行解可以由两个三条边得来。 详见代码解析 #include using namespace std; int a[22],n,cnt,ant,is[500007],dp[1050007]; struct node { int num,id; }angle[500007... 阅读全文
posted @ 2018-03-18 11:54 蔡军帅 阅读(210) 评论(0) 推荐(0)
摘要: 找循环节,肯定在40项以内,不会证明。 阅读全文
posted @ 2018-03-18 11:20 蔡军帅 阅读(175) 评论(0) 推荐(0)
上一页 1 ··· 119 120 121 122 123 124 125 126 127 ··· 164 下一页