/********************
*http://anycodes.cn/zh/
**********************/
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<stdio.h>
#include<string.h>
#include<queue>
#include<math.h>
usingnamespacestd;
..
分类:
其他好文 时间:
2016-05-05 11:17:03
阅读次数:
160
#include<iostream>
#include<stdio.h>
#include<string.h>
#include<queue>
#include<math.h>
usingnamespacestd;
typedefstructBTNode
{
intdata;
structBTNode*lc;
structBTNode*rc;
}BTNode,*BiTree;
intss[]={1,3,5,-1,-1,2,-1,-1,4,6,-1,..
分类:
其他好文 时间:
2016-05-05 11:15:55
阅读次数:
205
创建型:Singleton(单例模式) 单例模式,或者称为元件模式。一般来说,在所有模式中,属于最小代码实现的翘楚。刚找工作那会,经常在笔试题遇到写出你知道的设计模式,基本上单例是必写的,不为啥,至少占地面积小。 一般我们有这两种实现: 静态变量在整个应用中只会持有一份对象,而全局访问点也只有一个, ...
分类:
其他好文 时间:
2016-05-04 07:50:03
阅读次数:
155
(a>b)?((b>c)?(cout<<a<<b<<c,100):(((a>c)?(cout<<a<<c<<b,101):(cout<<c<<a<<b,102)),100)):((a>c)?(cout<<b<<a<<c,200):(((b>c)?(cout<<b<<c<<a,201):(cout<..
分类:
其他好文 时间:
2016-05-03 16:23:18
阅读次数:
221
一例shell脚本:取得目录下(包括子目录)所有文件名、路径与文件大小。 代码,shell脚本: lsdir.sh ...
分类:
系统相关 时间:
2016-05-03 14:04:04
阅读次数:
442
/*
cout<<"*****************gamebyringlight**************************"<<endl;
cout<<"****一个全开的循环串联灯链为节约资源等待你的关灯动作******"<<endl;
cout<<"*****提示:当选择一盏灯时,该灯及旁边的灯状态均会发生变化****"<<..
分类:
其他好文 时间:
2016-04-30 01:14:45
阅读次数:
117
在APP开发中,大量的图片或消息占用系统内存,造成一堆垃圾信息,所以开发清除缓存功能就显得必不可少了。 代码段1:获取文件的大小 代码段2:获取文件的大小 代码段3:清除缓存功能方法一 代码段4:清除缓存功能方法二 ...
分类:
移动开发 时间:
2016-04-26 00:28:36
阅读次数:
256
#include<stdio.h>
intmain()
{
inte,g,f;
inta,b,c;
inteh,el,gh,gl,fh,fl;
for(a=1;a<10;a++)
{
for(b=1;b<10;b++)
{
if(a==b)
{
continue;
}
for(c=1;c<10;c++)
{
if(b==c||a==c)
{
continue;
}
for(e=..
分类:
编程语言 时间:
2016-04-22 10:44:57
阅读次数:
224
//buglastlinecannotswapwithn-1
//http://www.zhihu.com/question/22547591/
#include<iostream>
#include<queue>
#include<queue>
#include<vector>
#include<list>
#include<math.h>
#include<cstdio>
usingnamespacestd;
intii=..
分类:
其他好文 时间:
2016-04-22 09:31:18
阅读次数:
216
//最近喜欢上了队列。
//几个代码中均运用到了队列。
//
#include<iostream>
#include<queue>
#include<vector>
#include<list>
#include<math.h>
#include<cstdio>
usingnamespacestd;
intmain()
{
intn=4;
cin>>n;
intm=pow(2,n)..
分类:
其他好文 时间:
2016-04-22 09:29:39
阅读次数:
176