码迷,mamicode.com
首页 >  
搜索关键字:gets    ( 3597个结果
Tasker to detect application running in background
We used to be told that tasker is only capable of detecting foreground application, if the app gets into background running, it would see it as exit.I...
分类:移动开发   时间:2015-05-18 07:46:16    阅读次数:200
线段树(单点更新) POJ 2886 Who Gets the Most Candies?
题目传送门 1 #include 2 #include 3 #define lson l, m, rt > 1;23 build (lson);24 build (rson);25 }26 27 int update(int p, int l, int r, int rt)28 ...
分类:其他好文   时间:2015-05-15 19:53:15    阅读次数:118
学c语言做练习
/*编写一个函数,其功能是使输入字符串反序。在一个使用循环语句为这个函数提供输入的完整 程序中进行测试。*/#include #includevoid fanxu(char *zf);//反序函数int main(void) { char a[80];do { gets(a); fanxu(a); ...
分类:编程语言   时间:2015-05-14 18:32:36    阅读次数:119
POJ 2886 Who Gets the Most Candies?
题目链接:http://poj.org/problem?id=2886题意:N个人坐成一个圈,每个人都有个值A代表这他左边或右边的第A个人出圈,刚开始第k个人出圈。第i个人出圈得到价值为i的因子数的个数。求出圈价值最大的那个人。思路:因为数据N为500000,所以需要利用线段树。不需要考虑N个人坐成一圈,认为N个人排成一个队列。每次更新当前队列中第k个人出圈,得到出圈人的下标。代码如下:#inclu...
分类:其他好文   时间:2015-05-14 14:15:44    阅读次数:94
掌握string.h里的常用函数
字符串输出函数 puts格式: puts(字符数组名)功能:把字符数组中的字符串输出到显示器。 即在屏幕上显示该字符串。字符串输入函数 gets格式: gets (字符数组名)功能:从标准输入设备键盘上输入一个字符串。本函数得到一个返回值,即为该字符数组的首地址。1 #include"stdio.h...
分类:其他好文   时间:2015-05-13 21:37:42    阅读次数:120
Oracle 通过AWR的SQL ordered by Gets和SQL ordered by Reads
之前看过很多数据库报告,直到最近出现过两次严重的性能问题,非常有代表性,所以记录下来。    一次是报Oracle进程把数据库服务器的CPU弄到100%     SQL ordered by Gets  是在内存中取数据,单位是次,是消耗CPU的主要源头,在调试SQL的时候,大部分时候都是通过它来衡量性能。下面是实际的AWR报告,相当骇人啊: SQL ordered by Gets ...
分类:数据库   时间:2015-05-13 12:51:23    阅读次数:558
UVa445 - Marvelous Mazes
题意:给出一个字符串,由数字、大写字母、*  、和b组成,当s[i]=='b'时,输出换行;当是数字时,如s[i]=2,s[i+1]='T',连续输出两个T;如果出现连续数字,则输出这些连续数字的和个字母,如11A,则输出AA。 #include #include int main() { char s[140]; int i,j,sum,len; while(gets(...
分类:其他好文   时间:2015-05-12 00:10:43    阅读次数:120
C++常用的输入函数总结
主要的输入输出函数有6种:cin, cin.get() , cin.getline() ,getline() , gets() ,getchar()cin(1)根据变量的类型读取数据结束条件:回车键、空格键、TAB结束符的处理:缓冲区中丢弃使输入结束的结束符(回车键、空格键、TAB)#include...
分类:编程语言   时间:2015-05-10 23:42:42    阅读次数:218
HDU ACM 4847 Wow! Such Doge! 被水题坑了
分析:水题,题目居然这么长,全国邀请赛也有水题?strlen(a)返回的是无符号整形,strlen(a)-4会变为正的很大的数,还被RE了两次,唉!人老了。转换为int即可。 #include using namespace std; #define N 1000010 int main() { char a[N+10]; int ans,i; ans=0; while(gets(...
分类:其他好文   时间:2015-05-10 14:22:46    阅读次数:108
12个有趣面试题(C语言)
1.gets()函数 #include int main(int argc, char *argv[]) { char buff[10]; memset(buff, 0, sizeof(buff)); gets(buff); printf("\n The buffer entered is [%s]\n",buff); return 0; }答:上面代码里的问题在于函数gets...
分类:编程语言   时间:2015-05-10 09:52:12    阅读次数:132
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!