CatenymsDescriptionA catenym is a pair of words separated by a period such that the last letter of the first word is the same as the last letter of th...
分类:
其他好文 时间:
2015-10-31 18:35:20
阅读次数:
249
Intersecting LinesTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 12844Accepted: 5703DescriptionWe all know that a pair of distinct points on...
分类:
其他好文 时间:
2015-10-30 12:40:22
阅读次数:
163
A simple application to binary tree traversal.class Solution { typedef pair Rec; // last val - length unsigned ret; void go(TreeNode *p, Rec ...
分类:
其他好文 时间:
2015-10-28 12:09:31
阅读次数:
140
在日常使用中常会有这样的操作,一个对象有多个属性,在排序时,我们会先比较一种属性,当这个属性相等时我们会对下一个属性进行比较。这个时候键值对”pair”就能够十分高效地使用: template struct pair { T1 first; T2 second;};当然,普通的使...
分类:
其他好文 时间:
2015-10-28 10:38:29
阅读次数:
280
Based on Bucketing and "Majority Number I".class Solution { pair majorityNumber0(vector &num) { int count = 0; int ret = 0; fo...
分类:
其他好文 时间:
2015-10-28 07:03:29
阅读次数:
151
转载于:http://janeky.iteye.com/blog/769965我们先来学习一下JDK1.5 API中关于这个类的详细介绍: “可以在pair中对元素进行配对和交换的线程的同步点。每个线程将条目上的某个方法呈现给 exchange 方法,与伙伴线程进行匹配,并且在返回时接收其伙伴的对象...
分类:
编程语言 时间:
2015-10-27 17:34:46
阅读次数:
163
最全的c++map的用法1.map最基本的构造函数;mapmapstring;mapmapint;mapmapstring;mapmapchar;mapmapchar;mapmapint;2.map添加数据;mapmaplive;1.maplive.insert(pair(102,"aclive")...
分类:
编程语言 时间:
2015-10-27 15:03:32
阅读次数:
176
引入头文件:#include 1、初始化map a, b;map a, b;2、添加数据 map maplive; 法一:maplive.insert(pair(102,"aclive"));法二:maplive[112]="April";//map中最简单最常用的插入添加!3、查找数据...
分类:
编程语言 时间:
2015-10-21 10:48:17
阅读次数:
126
DescriptionMatt’s friend K.Bro is an ACMer.Yesterday, K.Bro learnt an algorithm: Bubble sort. Bubble sort will compare each pair of adjacent items and...
分类:
其他好文 时间:
2015-10-16 15:13:16
阅读次数:
260
golang里,操作mysql数据库,使用查询语句的时候,一般的写法rows, err := db.Query("SELECT name from table)if err != nil { return}for rows.Next() { var name string err ...
分类:
其他好文 时间:
2015-10-12 12:36:18
阅读次数:
151