- 博客(8)
- 资源 (12)
- 收藏
- 关注
原创 2015第六届蓝桥杯决赛--方格填数(DFS)
标题:方格填数在2行5列的格子中填入1到10的数字。要求:相邻的格子中的数,右边的大于左边的,下边的大于上边的。如【图1.png】所示的2种,就是合格的填法。请你计算一共有多少种可能的方案。请提交该整数,不要填写任何多余的内容(例如:说明性文字)。思路:先填满整个表,然后再判断是否符合条件,#include#incl
2016-04-23 18:29:51 2880
原创 2016第七届蓝桥杯--剪邮票(DFS)
第七题:剪邮票如【图1.jpg】, 有12张连在一起的12生肖的邮票。现在你要从中剪下5张来,要求必须是连着的。(仅仅连接一个角不算相连)比如,【图2.jpg】,【图3.jpg】中,粉红色所示部分就是合格的剪取。请你计算,一共有多少种不同的剪取方法。请填写表示方案数目的整数。注意:你提交的应该是一个整数,不要填写任何多余的内容或说
2016-04-12 08:35:59 7689
原创 2014年山东省第五届ACM--Weighted Median
Weighted MedianTime Limit: 2000MS Memory limit: 65536K题目描述For n elements x1, x2, ..., xn with positive integer weights w1, w2, ..., wn. The weighted median is the element xk satisfying and
2016-04-10 16:22:00 452
原创 2014年山东省第五届ACM--Factorial (求阶乘)
FactorialTime Limit: 2000MS Memory limit: 65536K题目描述Homelesser hates mathematics. He cannot even do addition and subtraction, not to mention computing factorial. He asks Cainiao2hao for help.
2016-04-10 16:02:57 450
原创 2014年山东省第五届ACM--Full Binary Tree (满二叉树)
Full Binary TreeTime Limit: 2000MS Memory limit: 65536K题目描述In computer science, a binary tree is a tree data structure in which each node has at most two children. Consider an infinite full
2016-04-10 15:58:38 627
原创 2014年山东省第五届ACM--angry_birds_again_and_again
angry_birds_again_and_again Time Limit: 2000MS Memory limit: 65536K题目描述The problems ca
2016-04-10 15:37:47 664
原创 2016第七届蓝桥杯-方格填数
方格填数如下的10个格子(如果显示有问题,也可以参看【图1.jpg】)填入0~9的数字。要求:连续的两个数字不能相邻。(左右、上下、对角都算相邻)一共有多少种可能的填数方案?请填写表示方案数目的整数。注意:你提交的应该是一个整数,不要填写任何多余的内容或说明性文字。我的思路是先填玩表,然后再判断是否符合要求;#include<...
2016-04-06 18:49:16 4722
原创 组合数学--卡特兰数
原理:令h(0)=1,h(1)=1,catalan数满足递推式:h(n)= h(0)*h(n-1)+h(1)*h(n-2) + ... + h(n-1)h(0) (n>=2)例如:h(2)=h(0)*h(1)+h(1)*h(0)=1*1+1*1=2h(3)=h(0)*h(2)+h(1)*h(1)+h(2)*h(0)=1*2+1*1+2*1=5另类递推式:h(n)=h(n-1
2016-04-05 07:38:07 698
wireshark 技术分享ppt
2020-10-23
Maven3.3.9
2016-11-05
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人