数据结构
DlPF_C
这个作者很懒,什么都没留下…
展开
-
HDU 5929 Basic Data Structure 双向队列
Mr. Frog learned a basic data structure recently, which is called stack.There are some basic operations of stack: ∙∙ PUSH x: put x on the top of the stack, x must be 0 or 1. ∙∙ POP: throw the elemen...原创 2018-07-19 10:16:55 · 229 阅读 · 0 评论 -
牛客多校第一场 J.Different Integers
原博地址:https://www.nowcoder.com/discuss/87249 题目描述 Given a sequence of integers a1, a2, ..., an and q pairs of integers (l1, r1), (l2, r2), ..., (lq, rq), find count(l1, r1), count(l2, r2), ..., coun...转载 2018-07-21 11:59:32 · 298 阅读 · 0 评论 -
杭电多校第三场 HDU 6319 Problem A. Ascending Rating (模拟单调队列)
Problem A. Ascending Rating Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 3701 Accepted Submission(s): 1225 Problem Description Be...原创 2018-07-31 20:59:50 · 282 阅读 · 0 评论 -
树上的启发式合并 CF1009 F. Dominant Indices
http://codeforces.com/contest/1009/problem/F 讲解:http://codeforces.com/blog/entry/44351 讲解中的问题是解决树上结点特性查询,而本题是查询相对于一个结点每一层根的个数。 #include<bits/stdc++.h> #define maxn 1000010 using namespace st...转载 2018-08-14 20:37:22 · 255 阅读 · 0 评论 -
LeetCode 894 All Possible Full Binary Trees
题目地址:https://leetcode.com/problems/all-possible-full-binary-trees/description/ 对二叉树的递归构造。 对奇数枚举左右子树点的个数,偶数不符合条件直接返回 /** * Definition for a binary tree node. * struct TreeNode { * int val; ...转载 2018-09-08 21:21:23 · 237 阅读 · 0 评论 -
LeetCode 895. Maximum Frequency Stack
题目地址:https://leetcode.com/problems/maximum-frequency-stack/description/ 优先队列模拟栈 class FreqStack { public: struct Node { int x,y,p; bool operator < (const Node &N) con...转载 2018-09-08 21:23:56 · 346 阅读 · 0 评论