摘要:
/*Source CodeProblem: 2104 User: 96655Memory: 14808K Time: 1282MSLanguage: G++ Result: AcceptedSource Code*/#include#include#incl... 阅读全文
摘要:
#include#include#include#include#include#include#include#include#includeusing namespace std;struct Node{ int c; int next[26];} node[20005];int c... 阅读全文
摘要:
每个节点维护一个最小值,更新发现如果大于最小值,直接向下更新。速度还可以。。#include#include#include#include#include#include#include#include#includeusing namespace std;const int maxn=50005... 阅读全文
摘要:
维护一个sum数组,有点划分树的思想,写过划分树的应该能看出来#include#include#include#include#include#include#include#include#includeusing namespace std;const int maxn=500005;int s... 阅读全文
摘要:
http://acm.fzu.edu.cn/problem.php?pid=2022刚开始MLE,用map对应,果断爆内存了,然后改用去重,离散化, lowbound查找元素位置,速度还不错,不过pushup写也是醉了,一遍遍错,最后发现if(o[rt].left==INF||o[rt].right... 阅读全文
摘要:
http://acm.fzu.edu.cn/problem.php?pid=1858一个数组中 找两对元素,第一对元素和最大,第二对元素和最小,限制:一对元素中两个元素的距离在原数组中小于d。去掉这两对元素,剩下的求平均值。思路:先找两个最大的,暴力枚举第一对元素的最后一个元素,然后维护一个单调减队... 阅读全文