码迷,mamicode.com
首页 >  
搜索关键字:pair    ( 2800个结果
C++中的pair,make_pair学习
std::pair主要的作用是将两个数据组合成一个数据,两个数据可以是同一类型或者不同类型。例如std::pair<int,float> 或者 std::pair<double,double>等。pair实质上是一个结构体,其主要的两个成员变量是first和second,这两个变量可以直接使用。初始 ...
分类:编程语言   时间:2017-08-11 10:34:18    阅读次数:225
Minimum Transport Cost Floyd 输出最短路
These are N cities in Spring country. Between each pair of cities there may be one transportation track or none. Now there is some cargo that should b ...
分类:其他好文   时间:2017-08-11 10:03:00    阅读次数:223
Gym100096D
Problem D. Guessing game Input file: game.in Output file: game.out Byteman is playing a following game with Bitman. Bitman writes down some 1 000 000 ...
分类:其他好文   时间:2017-08-11 00:27:32    阅读次数:272
HDU 6103 Kirinriki(尺取法)
http://acm.hdu.edu.cn/showproblem.php?pid=6103 题意: 给出一个字符串,在其中找两串互不重叠的子串,计算它们之间的dis值,要求dis值小于等于m,求能选的子串的最大长度。 思路: 由于这两个子串是互不重叠的,那么这两个子串之间的间隔可以是奇数也可以是偶 ...
分类:其他好文   时间:2017-08-10 22:36:43    阅读次数:144
POJ1930
题目链接:http://poj.org/problem?id=1930 题目大意: 给一个无限循环小数(循环节不知),要求你输出当该小数所化成的最简分数分母最小时所对应的最简分数。 AC思路: 完全没思路,思路来源于:码农场(http://www.hankcs.com/program/cpp/poj ...
分类:其他好文   时间:2017-08-10 01:10:46    阅读次数:143
hdu 6085 Rikka with Candies(bitset)
题目链接:hdu 6085 Rikka with Candies 题意: 给你一个A序列和B序列,A和B内的每个数都不相同,现在有q个询问,问对于每个询问的k输出A[i]%B[j]==k的个数的奇偶性。 题解: 考虑两种情况: 1. 当A[i]<B[i]时,对于当前询问的k,只要A[i]中有k,那么 ...
分类:其他好文   时间:2017-08-09 11:26:17    阅读次数:200
R语言笔记
循环: 函数: 函数的返回值是要评估的函数体中的最后一个表达式 pair与map: 参考资料: w3c R语言教程 ...
分类:编程语言   时间:2017-08-08 21:48:30    阅读次数:201
冒泡算法
public class BubbleSortTest { public static void main(String[] args) { int[] A=new int[]{5,6,7,9,8,1,5,3}; sortIntegers2(A); System.out.println(Arrays... ...
分类:编程语言   时间:2017-08-08 15:25:09    阅读次数:116
poj 2566 尺取法
#include<iostream>#include<cstdio>#include<cstring>#include<cmath>#include<algorithm>using namespace std;#define ll long longint n,k;ll t;typedef pair ...
分类:其他好文   时间:2017-08-07 18:33:13    阅读次数:204
ZOJ 3961: Let's Chat
Let's Chat ///@author Sycamore, ZJNU ///@date 4/22/2017 #include #include #include #include #include #include #include #include #include #include #inc... ...
分类:其他好文   时间:2017-08-07 00:08:02    阅读次数:232
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!