摘要:
#include #define Num 1000int main(){ int i = 0,j,k,count2 = 0; char s[Num] = {'\0'},t[Num]; int c; while((c = getchar()) != EOF ) { ... 阅读全文
摘要:
#include #define Num 1000000/*int binsearch(int x,int v[],int n){ int low,high,mid; low = 0; high = n-1; while(low v[mid]) hig... 阅读全文
摘要:
#include int lower(char a){ int b; b = (a >= 'A' && a <= 'Z') ? (a - 'A' + 'a') : a; return b;}int main(){ int c; while((c = getcha... 阅读全文
摘要:
#include /*int bitcount(unsigned x){ int b; for(b = 0;x != 0;x >>= 1) { if(x & 1) b++; } return b; }*/int bitcount(unsi... 阅读全文
摘要:
#include unsigned setbits(unsigned x, int p, int n, unsigned y){ return (x & ((~0 unsigned invert(unsigned x,int p,int n){ return x ^ ((~(~0U un... 阅读全文
摘要:
转载自:点击打开链接 http://blog.csdn.net/weilaixi/article/details/3927826一、位运算符C语言提供了六种位运算符:& 按位与| 按位或^ 按位异或~ 取反> 右移1. 按位与运算 按位与运算符"&"是双目运算符。其功能是参与运算的两数各对应的二进位... 阅读全文
摘要:
#include #include #define Num 1000int main(){ int c,i,j = 0,m = 0,n = 0,k,count1 = 0,count2 = 0,w,h = 0,l = 0,flag2 = 0; char s[Num],t[Num],str... 阅读全文