题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1026这题是个好题,这题是我做的第一个搜索要求输出路径的, 没有想出来,解析:优先队列+bfs+链表式找前一个点,要用到栈(stack)。运用优先队列来选取当前时间(ans)最少那个点,并且用f[][]数组...
分类:
其他好文 时间:
2014-11-29 20:12:40
阅读次数:
161
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes...
分类:
其他好文 时间:
2014-11-29 06:46:39
阅读次数:
189
IOS--UILabel的使用方法详细//UILabel的使用UILabel*oneLabel = [[UILabelalloc]init];//最经常使用的oneLabel.frame=CGRectMake(0,0,320,200);//设置oneLabel的位置和大小oneLabel.text=...
分类:
移动开发 时间:
2014-11-28 21:26:12
阅读次数:
292
蓝牙,wifi,3g 作为移动端平台最常见的dongle,蓝牙现在应用越来越广泛,特别是现在流行智能终端,多点互控,wifi,3g等资源消耗大,红外又有距离和障碍物的限制,所以说蓝牙通信在未来其它的不说,单在智能TV上应用的情景将会越来越广泛.这里只是初步理解学习,之后将会一层一层从kernel直到application...
分类:
移动开发 时间:
2014-11-28 18:19:22
阅读次数:
173
1 新建一个继承自uitableviewcell的类2 重写initwithstyle:reuseIdentifier方法 添加所有需要显示的子控件(不需要设置子控件的数据和frame) 进行子控件一次性的设置(有些属性只需要设置一次)3 提供一个模型属性4 重写模型属性的setter方法,在这.....
分类:
其他好文 时间:
2014-11-28 18:10:03
阅读次数:
101
首先,预编译跟前后端没有关系,预编译一样可以用于后端渲染。看看下面的测试时间,单位: ms模板字符串:var s = '{{#datas}}{{name}} abcdefg {{type}} {{date}}{{/datas}}';数据对象: 放入100000行数据var stack = [];fo...
分类:
其他好文 时间:
2014-11-28 15:57:57
阅读次数:
139
Write a program to find the node at which the intersection of two singly linked lists begins.
For example, the following two linked lists:
A: a1 → a2
↘
...
分类:
编程语言 时间:
2014-11-28 10:16:15
阅读次数:
157
以前从没遇到过这种问题,发现自重装系统后,就开始触发这个bug了.从error-log等视图里点击打开的java文件或者xml文件时,出现”unhandled event loop exception”错误,出错信息如下: Exception Stack Trace:org.eclipse.swt....
分类:
系统相关 时间:
2014-11-28 01:02:57
阅读次数:
383
一、task基本概念1、task:任务栈,只针对activity而言,栈里面存放了许多Activity,是一个先进后出的链表,记录维护了当前开启的activity。一般情况,应用程序启动之后,运行一个Activity,该Activity 对象被压入到Stack当中,activity被销毁掉时,就把这...
分类:
其他好文 时间:
2014-11-27 22:03:10
阅读次数:
162
CGRect frame = [[UIScreen mainScreen] applicationFrame];//获取窗口大小 UIView *theView = [[UIView alloc] initWithFrame:frame];//实例一个UIView theView.backgr...
分类:
其他好文 时间:
2014-11-27 21:53:44
阅读次数:
115