2016 Bluebridge cut_stamps
来源:互联网 发布:在线翻译软件 编辑:程序博客网 时间:2024/06/08 14:07
剪邮票
如【图1.jpg】, 有12张连在一起的12生肖的邮票。
现在你要从中剪下5张来,要求必须是连着的。
(仅仅连接一个角不算相连)
比如,【图2.jpg】,【图3.jpg】中,粉红色所示部分就是合格的剪取。
请你计算,一共有多少种不同的剪取方法。
I'm tring to write my blog in english to prove my english ability.If yout found angthing was wrong please help me to correct it.Cheers!
————————————————————————————————————————————————————————————————————————————
In this case , I listed all the combinations of digit. And testing if the combination is valid. The problem is not hard.
Tips:
1. treat the form like 1,2,3,4,6,7,8,9,11,12,13,14 but not 1,2,3,4,5,6,7,8,9,10,11,12. It can avoid the some cases while we testing the combination. Like 4 plus 1 then boom there is a 5, but this case isn't valid to the problem.
2.In funtions which have return value you must put a "return" in it or the program will return a random digit.
- 2016 Bluebridge cut_stamps
- 2016
- 2016
- 2016
- 2016!
- 2016
- 2016
- 2016
- 2016
- 2016
- 2016
- 2016
- 2016
- 2016
- 2016-
- 2016
- 2016
- 2016
- 服务器、交换机、IP与IP地址
- java中的String类
- jvm_outofmemory_HeapOOM
- [leetcode]367. Valid Perfect Square
- 第二次课笔记
- 2016 Bluebridge cut_stamps
- 第二章 数据模型
- jvm_outofmemory_JavaVMStackOOM
- 一种适合懒人的JSON解析方法
- Android 沉浸式状态栏的实现方法、状态栏透明
- 折半查找
- jvm_outofmemory_JavaVMStackSOF
- python正则表达式
- 关于IAR报 more than one storage class may not be specified 错误的问题