码迷,mamicode.com
首页 >  
搜索关键字:pair    ( 2800个结果
uva 1592
一开始写的是这样: 用了书上写的ID函数,然后存二元组使用的大数相乘的方法,因为看错题目BIG一开始定义为10010,错了好几次找了半天错误=.= 后来发现存二元组也可以用make_pair(x,y)#include #include #include #include #include #define B...
分类:其他好文   时间:2015-05-03 16:04:37    阅读次数:99
STL之容器map
1.首先介绍map具有与set集合同样的自动排序功能   插入方法之pair #include #include #include using namespace std; int main() { map m; //必须有两个类型 m.insert(pair(2,"student_two")); m.insert(pair(1,"student_one")); ...
分类:其他好文   时间:2015-04-29 17:23:01    阅读次数:118
poj 2337 有向图输出欧拉路径
CatenymsTime Limit:1000MSMemory Limit:65536KTotal Submissions:10186Accepted:2650DescriptionA catenym is a pair of words separated by a period such tha...
分类:其他好文   时间:2015-04-28 20:29:52    阅读次数:244
坐标离散化处理
#include using namespace std; #define maxn 505 typedef pair P; int W, H, N; int X1[maxn], X2[maxn], Y1[maxn], Y2[maxn]; bool fld[maxn][maxn]; int d[2][4] = {{-1, 0, 1, 0}, {0, -1, 0, 1}}; int comp...
分类:其他好文   时间:2015-04-28 11:54:28    阅读次数:112
快学Scala 第17章 - 类型参数 习题解答
1. 定义一个不可变类Pair[T,S],带一个swap方法,返回组件交换过位置的新对偶。 package?ex17_01 object?Main?extends?App?{ ??val?p?=?new?Pair(97?->?‘a‘) ??val?a?=?p.swap ??println(a) ...
分类:其他好文   时间:2015-04-28 08:19:26    阅读次数:172
Codeforces Round #179 (Div. 2)---D. Greg and Graph(离线+floyd)
Greg has a weighed directed graph, consisting of n vertices. In this graph any pair of distinct vertices has an edge between them in both directions. Greg loves playing with the graph and now he has in...
分类:其他好文   时间:2015-04-27 15:17:42    阅读次数:112
最短路--dijkstra+优先队列优化模板
不写普通模板了,还是需要优先队列优化的昂 1 #include //基本需要的头文件 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 typedef pair pii; 8 const int I...
分类:其他好文   时间:2015-04-24 21:07:17    阅读次数:263
俄罗斯方块
我们选择改进Tetris(俄罗斯方块)作为我们的Pair Project 经过调研,我们发现大家对传统的俄罗斯方块游戏已经非常厌倦了,因为它游戏模式单一,缺乏挑战性和竞技性,只能一个人玩,同时方块种类没有任何改变,都是大家很厌倦的那几种,因此我们希望在这些方面上做提高。 ...
分类:其他好文   时间:2015-04-24 18:42:23    阅读次数:179
一天一个类,一点也不累 之 Set接口
我们的口号是:一天一个类,一点也不累~~再次回忆一下集合相关的类图。官方API上这样介绍这个接口:A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1 ...
分类:其他好文   时间:2015-04-23 21:28:32    阅读次数:204
Pair C++
C++ Pair...
分类:编程语言   时间:2015-04-22 20:42:09    阅读次数:143
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!