随笔分类 - book comments
摘要:T(n)=aT(n/b)+f(n); where we can interpret n/b to mean either floor(b/n) or ceil(b/n), Then T (n) has the following asymptotic bounds: 1. If f (n)= O(n
阅读全文
摘要:#include<stdio.h>#include<stdlib.h>#include<time.h>#define ARRAY_SIZE 1000int buf [ARRAY_SIZE];int main(){ srand((unsigned int )time(0)); int i,j,n; w
阅读全文
摘要:#include<stdio.h>#include<string.h>#include<stdlib.h>#include<time.h>#define ARRAY_SIZE 1000int buf[ARRAY_SIZE];int main(){ int i,j,n; srand((unsigned
阅读全文
摘要:macro is typeless and execute faster than funtion ,becaus of the overhead of calling and returnning of function,but macro will increase the size of pr
阅读全文
摘要:#include<cstdio>#include<cstring>const int maxn=100005;int buf[maxn];int main(){ freopen("input.txt","r",stdin); memset(buf,0,sizeof(buf)); int i,j,k,
阅读全文
摘要:#include<cstdio>#include<cstring>const int maxn=100005;int buf[maxn];int main(){ freopen("input.txt","r",stdin); memset(buf,0,sizeof(buf)); int i,j,k,
阅读全文