摘要: #include#includeconst int N=100000+5;const int m=100000007;int n,c[N];int lowbit(int x){ return x&(-x);}void add(int x){ while(x0) { ... 阅读全文
posted @ 2015-07-27 20:13 xryz 阅读(101) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;int main(){ int a[10], ans, i; while (~scanf("%d", &a[1])) { f... 阅读全文
posted @ 2015-07-27 17:23 xryz 阅读(95) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;const int inf=10) { for(j=200000;j>=s[i];j--) if(dp[j... 阅读全文
posted @ 2015-07-27 15:34 xryz 阅读(90) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;int n,c[20000+5],d[20000+5],a[20000+5],p[100000+5];int sum(int x){ int ret=0; while(x>0) ... 阅读全文
posted @ 2015-07-27 13:32 xryz 阅读(96) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;int c[1048][1048],n;int lowbit[1048];void add(int x,int y,int d){ int i,j; for(i=x;i0;i-=low... 阅读全文
posted @ 2015-07-27 10:47 xryz 阅读(106) 评论(0) 推荐(0) 编辑
摘要: int lowbit(int x){ return x&(-x);}int sum(int x){ int ret=0; while(x>0) { ret+=c[x]; x-=lowbit(x); } return re... 阅读全文
posted @ 2015-07-27 09:25 xryz 阅读(93) 评论(0) 推荐(0) 编辑