码迷,mamicode.com
首页 >  
搜索关键字:pair    ( 2800个结果
1001 A+B Problem
Calculate a+b 计算a+b Input 输入 The input will consist of a series of integers a and b, separated by a space, one pair of integers pet line 输入由一对整数a和b组成, ...
分类:其他好文   时间:2018-07-26 13:15:18    阅读次数:138
基环树上求环
题目描述 A subway scheme, classic for all Berland cities is represented by a set of n stations connected by n passages, each of which connects exactly two ...
分类:其他好文   时间:2018-07-25 20:12:34    阅读次数:153
Astronauts UVALive - 3713(2-SAT)
大白书例题 ...
分类:其他好文   时间:2018-07-25 13:48:17    阅读次数:165
EOJ 3213 Stack
#include using namespace std; typedef pair pii; const int maxN=1e6+5; stack s; int res[maxN]; int main(){ int n,u; scanf("%d",&n); for(int i=0;i<n;i++... ...
分类:其他好文   时间:2018-07-25 01:02:43    阅读次数:166
Code Signal_练习题_Are Similar?
Two arrays are called similar if one can be obtained from another by swapping at most one pair of elements in one of the arrays. Given two arrays a an ...
分类:其他好文   时间:2018-07-24 23:51:48    阅读次数:383
LeetCode 406.Queue Reconstruction by Height
我们先来看题目描述: Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height ...
分类:其他好文   时间:2018-07-24 20:52:06    阅读次数:148
Cells UVALive - 3486(dfs序+手动开栈)
给一棵树,每次每次询问一个点是否是另一个点的祖先? 输入时是每个下标对应节点的儿子的数量 用dfs序 时间戳。。 如果一个点是另一个点的祖先,那么它的两个标记一定在祖先的范围之内 ...
分类:其他好文   时间:2018-07-24 20:02:02    阅读次数:162
D-query SPOJ - DQUERY(莫队)统计不同数的数量
Given a sequence of n numbers a1, a2, ..., an and a number of d-queries. A d-query is a pair (i, j) (1 ≤ i ≤ j ≤ n). For each d-query (i, j), you have ...
分类:其他好文   时间:2018-07-24 17:44:36    阅读次数:218
hdu 多校第一场
1001 思路:打表可以发现只有3|n 和 4|n 的情况有解,判一下就好啦。 #include<bits/stdc++.h> #define LL long long #define fi first #define se second #define mk make_pair #define p ...
分类:其他好文   时间:2018-07-24 14:05:25    阅读次数:151
Leetcode 290. 单词模式
class Solution { public: bool wordPattern(string pattern, string str) { map word_map; char used[128] = {0}; string word; int pos= 0; str.push_back(' '... ...
分类:其他好文   时间:2018-07-23 15:55:40    阅读次数:131
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!