USACO Section 2.2 Party Lamps
来源:互联网 发布:java tld 自定义标签 编辑:程序博客网 时间:2024/04/29 18:55
analysis第一句:There are a number of insights required for this problem.真是没错。。
其实很简单,我刚一看时想复杂了。。
USACO题都这样么。看起来难,其实简单。
一共只有八种情况,预处理一下存起来就好。
比如n=10,8种情况按2进制排序后:
0.0000000000
1.0011100011
2.0101010101
3.0110110110
4.1001001001
5.1010101010
6.1100011100
7.1111111111
很容易发现c=0时只有7一种情况,check一下可以就输出
c=1时可以变成0,2,3,5四种情况,按顺序check,输出
c=2时除了第3种情况
c>2时8个都可以
代码~
- USACO Section 2.2 Party Lamps
- USACO section 2.2 Party Lamps
- USACO Section 2.2 Party Lamps
- USACO Section 2.2 Party Lamps
- USACO-Section 2.2 Party Lamps (枚举)
- USACO 2.2 Party Lamps (lamps)
- Section 2.2 Party Lamps
- USACO 2.2 Party Lamps
- USACO 2.2 Party Lamps
- USACO 2.2Party Lamps
- USACO 2.2 Party Lamps
- USACO Section 2.2 Party Lamps - 看清本质就简单!
- UAACO Section 2.2 Party Lamps
- USACO 2.2.4 Party Lamps
- [USACO 2.2.4] Party Lamps
- USACO 2.2.4 Party Lamps
- USACO 2.2.4 Party Lamps
- USACO 2.2.4 Party Lamps
- 使用盖莫游戏引擎2.1.1天空面渲染天空!
- ASP.net弹出层的效果
- Oracle PL/SQL语言基础
- ASP.NET使用Request获取来源网址URL参数
- 初次见面 请多关照
- USACO Section 2.2 Party Lamps
- x++ Run Object in AOT
- 模拟器中文乱码问题
- oracle +c#循序渐进
- PKG语法详细说明 常用高级选项
- April 8th Tuesday 2010
- FM Desktop的一些消息
- 基于DUAL-PORT RAM的双CPU快速通讯
- TreeView数据集绑定及取值