传送门
树状数组裸题
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #define N 100001 using namespace std; int n, m, ans; int a[N], b[N], R[N], L[N], c[N]; inline int read() inline void add(int x) inline int query(int x) int main() memset(c, 0, sizeof(c)); for(i = n; i >= 1; i) for(i = 1; i <= n; i++) if(max(L[i], R[i]) > 2 * min(L[i], R[i])) ans++; printf("%d\n", ans); return 0; }
上一篇:[luoguP1437] [HNOI2004]敲砖块(DP)
下一篇:hihoCoder#1196 : 高斯消元·二(开关灯问题)
离散化 树状数组









