做一个题目时,看见解法中使用了优先队列,http://hawstein.com/posts/3.6.html
。颇为好奇,找资料学习了一下,顺便做个摘要。c++的用法:转自:http://blog.chinaunix.net/uid-21712186-id-1818266.html#include
...
分类:
编程语言 时间:
2014-05-12 10:17:49
阅读次数:
421
排序算法有很多,冒泡排序,选择排序,堆排序,快速排序,归并排序,基数排序……其中平均复杂度O(nlogn)的排序算法或者在某方面有特殊优势的算法在ACM中才有实际使用价值,所以上述提到的前2种大家以后就不要用了。其他排序算法大家会慢慢接触,本文主要介绍使用最多的排序函数
sort。大家可能会遇到qs...
分类:
其他好文 时间:
2014-05-12 09:24:26
阅读次数:
323
功能: 1. 在TextView中显示图片,类似于含有表情图片的聊天
2.设置TextView的部分text可以点击说明: SpannableString
实现了CharSequence接口,可以将text的指定部分标记为CharacterStyle对象,如ImageSpan,Clickabl...
分类:
移动开发 时间:
2014-05-12 04:23:52
阅读次数:
625
如果在内部类里面用this就是指这个内部类的实例,而OuterClassName.this就是它外面的那个类的实例
ClassName.this这个用法多用于在nested class(内部类)中,当inner class(内部类)必顺使用到outer class(外部类)的this instance(实例)时,就用OuterClassName.this
android中常...
分类:
移动开发 时间:
2014-05-11 15:06:09
阅读次数:
333
int main(int argc, char *argv[]){}
argc:传入字符串常量个数。
argv 是字符串数组,argv[i]指向第i个字符串常量。第0个为程序名。...
分类:
其他好文 时间:
2014-05-11 07:06:06
阅读次数:
274
// boost2.cpp : 定义控制台应用程序的入口点。
//boost gregorian_date usage
//made by davidsu33 2014-5-10
#include "stdafx.h"
#include
#include
#include
#include
#include
using namespace std...
分类:
其他好文 时间:
2014-05-11 03:46:57
阅读次数:
814
// 使用实例方法创建NSString对象 NSString *string1 =
[[NSStringalloc]initWithFormat:@"姓名流年"]; NSLog(@"%@", string1); NSString
*string2 = [[NSSt...
分类:
其他好文 时间:
2014-05-11 00:47:31
阅读次数:
356
// NSDictionary NSDictionary *dictionary = [[
NSDictionaryalloc]initWithObjectsAndKeys:@"value1", @"key1", @"value2", @"key2",
@"v3", @"k3", @"v...
分类:
其他好文 时间:
2014-05-11 00:20:07
阅读次数:
308
一:在js中截取字符串的方法有两个:substring和sunstr 1、方法:
substring(int stringIndex,[int endIndex])截取从索引为stringIndex到索引为endIndex之间的字符
substr(int stringInd...
分类:
其他好文 时间:
2014-05-10 23:40:36
阅读次数:
1028