数状数组
Never_More
这个作者很懒,什么都没留下…
展开
-
poj_2481 Cows
#include #include #include #include using namespace std;const int maxn = 100000+100;int m;struct cow{ int s; int e; int index;};cow cw[maxn];int ans[maxn];int arr[maxn];bool cmp(cow原创 2014-11-27 20:18:28 · 227 阅读 · 0 评论 -
poj_2309 BST
lowbit 的应用,思路大于代码。#include int main(){ int N; scanf("%d",&N); while(N--) { int a; scanf("%d",&a); int b = a & (-a); b--; printf("%d %d\n",a-原创 2014-12-02 20:58:39 · 215 阅读 · 0 评论