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
#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
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
我们先来看题目描述: 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
给一棵树,每次每次询问一个点是否是另一个点的祖先? 输入时是每个下标对应节点的儿子的数量 用dfs序 时间戳。。 如果一个点是另一个点的祖先,那么它的两个标记一定在祖先的范围之内 ...
分类:
其他好文 时间:
2018-07-24 20:02:02
阅读次数:
162
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
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
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