码迷,mamicode.com
首页 >  
搜索关键字:pair    ( 2800个结果
C++ Primer 读书笔记2
1 Reada set of integers into a vector. Print the sum of each pair of adjacent elements.Change your program so that it prints the sum of the first and last elements,followed by the sum of the second an...
分类:编程语言   时间:2014-12-05 21:17:08    阅读次数:314
POJ 2485 Highways (kruskal 最小生成树)
HighwaysPOJ 2485so that it will be possible to drive between any pair of towns without leaving the highway system. Flatopian towns are numbered from 1...
分类:其他好文   时间:2014-12-03 14:09:22    阅读次数:185
C++标准程序库读书笔记-第四章通用工具
1.Pairs(对组) (1)class pair可以将两个值视为一个单元。任何函数需返回两个值,也需要pair。 (2)便捷地创建pair对象可以使用make_pair函数 std::make_pair(32,'@') 等价于 std::pair(int,char)(42,'@')
分类:编程语言   时间:2014-11-30 18:42:18    阅读次数:160
Slim Span
Description Given an undirected weighted graph G , you should find one of spanning trees specified as follows. The graph G is an ordered pair (V, E) , where V is a set of vertices {v1, v2...
分类:其他好文   时间:2014-11-26 22:45:41    阅读次数:364
分治算法-最邻近点问题Finding the closest pair of points
问题描述: 输入:空间平面上点集Q             输出:距离最近的两个点对 问题简化:如果是在一个直线上找最近的点对,则可以使用排序,之后找最近最近点。 分治思路: Divide 将其划分为两个部分Q1,Q2   T(n) = O(n) Conquer 分别找最近点对,   T(n) = 2T(n/2) Merge 比较分开点附近的两个点距离和找出的的距离T(n)= O(...
分类:编程语言   时间:2014-11-26 16:31:10    阅读次数:216
Product(大数相乘)
Description The problem is to multiply two integers X, Y. (0 Input The input will consist of a set of pairs of lines. Each line in pair contains one multiplyer. Output For...
分类:其他好文   时间:2014-11-25 14:39:45    阅读次数:169
1059. Prime Factors (25)
注意n=n这种情况// 1059.cpp : 定义控制台应用程序的入口点。//#include#include#include#includeusing namespace std;queue prime;vector > col;void printElem(const pair it){ ...
分类:其他好文   时间:2014-11-23 18:45:12    阅读次数:168
hdu4451 Dressing(容斥原理)
#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#define pii pair#d...
分类:其他好文   时间:2014-11-21 18:22:37    阅读次数:145
uva 10271
Problem CChopsticksInput:Standard InputOutput:Standard OutputIn China, people use a pair of chopsticks to get food on the table, but Mr. L is a bit di...
分类:其他好文   时间:2014-11-19 12:01:32    阅读次数:210
codeforces 489B. BerSU Ball 解题报告
题目链接:http://codeforces.com/problemset/problem/489/B题目意思:给出 n 个 boys 的 skills 和 m 个 girls 的 skills,要求成 pair 的条件为,男和女的 skill 差值最多只能为 1。问成 pair 最多是多少。 这....
分类:其他好文   时间:2014-11-19 07:05:13    阅读次数:179
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!