- (void)viewDidLoad{ [super viewDidLoad]; [self initButton];}- (void)initButton{ UIButton *button = [[UIButton alloc]init]; button.backgroundColor...
分类:
移动开发 时间:
2015-04-28 11:01:19
阅读次数:
324
栈的应用,一定要注意把栈清空啊,最近刚开始学数据结构,代码有点水,大家不要见怪
#include
#include
using namespace std;
int main()
{
int n;
string in,out;
stackroot;
while(cin>>n>>in>>out)
{
while(root.size()) root.pop();
string re...
分类:
其他好文 时间:
2015-04-27 21:58:30
阅读次数:
202
其实根本不需要用栈,因为这题不会出现盒子打不开的情况
#include
#include
#include
#define maxn 1000+5
using namespace std;
stackmapp;
int main()
{
char ans[maxn];
while(cin>>ans)
{
int sum=0;
while(mapp.size()) mapp.pop(...
分类:
其他好文 时间:
2015-04-27 21:55:57
阅读次数:
189
衰减动画- (void)viewDidLoad { [super viewDidLoad]; [self initCircleBtn];}- (void)initCircleBtn{ // 实例化手势,并最终将手势添加到圆形按钮上 UIPanGestureRecognizer *pan = [...
分类:
移动开发 时间:
2015-04-27 18:21:01
阅读次数:
125
1、redis简介redis是一个key-value存储系统。和Memcached类似,它支持存储的value类型相对更多,包括string(字符串)、list(链表)、set(集合)、zset(sorted set --有序集合)和hashs(哈希类型)。这些数据类型都支持push/pop、add...
栈特点:1.在栈顶添加或删除2.有序3.元素只能通过列表的一端访问4.后入先出(LIFO)栈的三个主要方法push()pop()peek();functionStack(){
this.top=0;
this.dataStore=[];
this.push=push;
this.pop=pop;
this.peek=peek;
this.clear=clear;
this.length=length;
}
functionpush(..
分类:
编程语言 时间:
2015-04-26 01:48:56
阅读次数:
128
STL 中队列的使用(queue)基本操作:push(x) 将x压入队列的末端pop() 弹出队列的第一个元素(队顶元素),注意此函数并不返回任何值front() 返回第一个元素(队顶元素)back() 返回最后被压入的元素(队尾元素)empty() 当队列为空时,返回truesize() 返回队列...
分类:
其他好文 时间:
2015-04-25 21:00:09
阅读次数:
129
.navbar .nav > li .dropdown-menu { margin: 0;}.navbar .nav > li:hover .dropdown-menu { display: block;}
分类:
其他好文 时间:
2015-04-25 00:01:08
阅读次数:
255
优先队列,真是水的不行~
保持队列里只有K个元素即可
#include
#include
using namespace std;
priority_queue, greater >mapp;
int n,k;
string cmd;
int main()
{
while(cin>>n>>k)
{
while(mapp.size()) mapp.pop();
while(n--)
...
分类:
其他好文 时间:
2015-04-22 22:21:58
阅读次数:
105
简介redis是一个key-value存储系统。和Memcached类似,它支持存储的value类型相对更多,包括string(字符串)、list(链表)、set(集合)和zset(有序集合)。这些数据类型都支push/pop,add/remove及取交集并集和差集及更丰富的操作,而且这些操作都是原子性的。在此基础上,redis支持..
分类:
其他好文 时间:
2015-04-22 15:56:34
阅读次数:
148