题目描述:
给定A-Z中的前L个字符进行任意组合;
对于组合得到的字符串中不含有相邻的重复串的为hard串
按字典序求解第n个hard串
解题思路:回溯法即可
#include
#include
using namespace std;
int n,l;
char ans[82];
bool check(int len)
{
int flag=false;
...
分类:
其他好文 时间:
2015-07-29 17:20:11
阅读次数:
135
不难,细心,先写框架,逐步完善即可。代码如下:#include #include using namespace std;int n, L, ans[80], cnt(0), ove = false;;bool isHard(int cur) { int bor = (cur + 1) / 2; f...
分类:
其他好文 时间:
2015-07-26 20:29:48
阅读次数:
118
async Task Button1Click(){ // Assume we're being called on UI thread... if not, the two assignments must be made atomic.// Note: we factor out "FooH.....
分类:
其他好文 时间:
2015-07-24 22:24:48
阅读次数:
124
模型导入Unity 的参数设置 Model 栏参数 Meshes : 对于Scale Factor ,File Scale 一般来说要更改的话,保持各个模型的一致性. Mesh Compression 网格压缩的,用于对模型的压缩设置. 四个参数 Off Low Mediu...
分类:
其他好文 时间:
2015-07-16 21:18:01
阅读次数:
209
R代码ggplot(channel2,aes(x=factor(Name),,fill=Type))+geom_bar(aes(y=Amount,fill=factor(Type)),stat="identity" ,width=0.3)+geom_bar(aes(y=Amount2,fill=f....
分类:
其他好文 时间:
2015-07-15 18:53:09
阅读次数:
218
创建一个topic: [root@hdp1 bin]# ./kafka-topics.sh --create --zookeeper hdp1:2181 --replication-factor 1 --partitions 1 --topic justin Created topic "justi...
分类:
其他好文 时间:
2015-07-15 11:04:43
阅读次数:
292
今晚很好奇想知道Oracle下有没有APPLY子句?如果有那怎么实现SQL Server下的TOP + APPLY。结果自己写了个例子。with a as (select grp_factor from (select distinct grp_factor from numbers where i...
分类:
移动开发 时间:
2015-07-08 01:56:00
阅读次数:
166
B+树在NTFS文件系统中的应用flyfish 2015-7-6卷(volume)
NTFS的结构首先从卷开始。卷对应于磁盘上的一个逻辑分区,当你将一个磁盘或者磁盘的一部分格式化成NTFS,卷将被创建起来。一个磁盘可以有一个卷或好几个卷.NTFS独立的处理每一个卷。
卷对应的就是C盘,D盘,E盘等。簇(cluster)
在一个NTFS卷中,簇的大小,或者说簇因子(cluster factor)...
分类:
Web程序 时间:
2015-07-06 19:55:04
阅读次数:
222
用hierachical query,即connect by配合dual表生成序列,mod这个是取余函数,生成group factor。最后面的connect by rownum <= 100可以替换为connect bylevel <= 100select case when mod(rownum...
分类:
数据库 时间:
2015-07-05 18:24:05
阅读次数:
133