CodeForces 459D Pashmak and Parmida's problem 树状数组 + 离散化
题目链接:http://codeforces.com/problemset/problem/459/D将序列离散化之后,很方便就可以处理出f值
逆序将后缀F值加入树状数组中,同时更新ans值代码:#include <bits/stdc++.h>
#define sf scanf
#define pf printf
using namespace std;
typedef long long LL;
原创
2016-11-04 14:59:46 ·
453 阅读 ·
0 评论