![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
剑指offer
xiaohunuli
这个作者很懒,什么都没留下…
展开
-
剑指offer 1384 二维数组中的查找
#include int binary_search(int a[],int l,int r,int t){ int begin=l; int end=r; while(begin<=end){ int mid=(begin+end)/2; if(t==a[mid]) return 1; else if(t<a[mid])原创 2014-07-16 16:22:32 · 270 阅读 · 0 评论 -
题目1510:替换空格
#include #include char str[1000000]; int main(){ while(gets(str)){ int count=0,i,j; int len=strlen(str); for(i=0;i<len;i++){ if(str[i]==' ') count++; }原创 2014-07-16 17:40:11 · 250 阅读 · 0 评论