摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=2795放在第几行 就是第几行的剩余空值x》xi 以行建树 求区间第K值View Code 1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<algorithm> 5 using namespace std; 6 #define N 200010 7 #define LL __int64 8 LL s[N<<2],h,ww; 9 void build(int 阅读全文
摘要:
http://poj.org/problem?id=3225先贴代码 有空再解释View Code 1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<algorithm> 5 using namespace std; 6 #define N 140000 7 int s[N<<2],kc[N<<2],hash[N]; 8 void build(int l,int r,int w) 9 { 10 kc[w] = 0; 11 s[w] 阅读全文
摘要:
A 判断不同字母的个数为偶数还是奇数#include <iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;int main(){ int i,j,k,n,num[500]; memset(num,0,sizeof(num)); char str[201]; gets(str); k = strlen(str); for(i = 0 ; i < k ; i++) num[str[i]]++; int count = 0; for(i 阅读全文