#include #include #includeint main(){ int i,j; char arr[60],str[] = {"`1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./"}; while(gets(arr) != ...
分类:
其他好文 时间:
2015-06-16 18:57:51
阅读次数:
147
strcpy_s和strcpy()函数功能几乎相同。strcpy函数。就象gets函数一样,它没有方法来保证有效的缓冲区尺寸。所以它仅仅能假定缓冲足够大来容纳要拷贝的字符串。在程序执行时,这将导致不可预料的行为。用strcpy_s就能够避免这些不可预料的行为。这个函数用两个參数、三个參数都能够,仅仅...
分类:
其他好文 时间:
2015-06-16 14:27:26
阅读次数:
87
Redis目录下文件:redis-server.exe:服务程序 redis-check-dump.exe:本地数据库检查 redis-check-aof.exe:更新日志检查 redis-benchmark.exe:性能测试,用以模拟同时由N个客户端发送M个 SETs/GETs 查询 (类似于 A...
分类:
其他好文 时间:
2015-06-16 12:20:44
阅读次数:
89
You’re typing a long text with a broken keyboard. Well it’s not so badly broken. The only problem with
the keyboard is that sometimes the “home” key or the “end” key gets automatically pressed (inter...
分类:
其他好文 时间:
2015-06-15 11:22:10
阅读次数:
95
Memphis loves xor very musch.Now he gets an array A.The length of A is n.Now he wants to know the sum of all (lowbit(Ai xor Aj)) (i,j∈[1,n])
We define that lowbit(x)=2k,k
is the smallest integer sa...
分类:
其他好文 时间:
2015-06-14 09:34:19
阅读次数:
150
Problem DescriptionMemphis loves xor very musch.Now he gets an array A.The length of A is n.Now he wants to know the sum of all (lowbit(Ai xor Aj) (i,...
分类:
编程语言 时间:
2015-06-13 22:53:56
阅读次数:
226
strcpy_s和strcpy()函数功能几乎相同。strcpy函数。就象gets函数一样,它没有方法来保证有效的缓冲区尺寸,所以它仅仅能假定缓冲足够大来容纳要拷贝的字符串。在程序执行时,这将导致不可预料的行为。用strcpy_s就能够避免这些不可预料的行为。这个函数用两个參数、三个參数都能够,仅仅...
分类:
其他好文 时间:
2015-06-11 22:38:44
阅读次数:
147
scanf() 处理字符串时, 更基于获取单词, 而不是获取字符串, 在字符串末尾增加 '\0' 字符, 如果指定了宽度, 则字符串长度为 N + 1, 停止读取字符串结束原因: 1.遇到了第一个非空白字符 2.如果指定了宽度, 读取指定宽度后停止读取gets(char buffer[]) 从标.....
分类:
编程语言 时间:
2015-06-11 16:49:32
阅读次数:
158
注意:空行要输出Yes,要用gets读函数,这道题让我学会了gets和scanf函数除了空格问题之外还是
有区别的,scanf把空格,Tab, 回车都视为结束标志,不会读入他们,后面自动加'\0',所以空格,回车,Tab
都在缓冲区,可以用getchar()读取到,但是gets()函数虽然也将回车视为结束标志,但是他们会将回车读
入,读到字符串里是'\0',所以,他们就不会存在缓冲区里,也就...
分类:
其他好文 时间:
2015-06-11 09:33:04
阅读次数:
120
#include
#include
#include
#include
#include
#include
using namespace std;
stack S;
stack Q;
int main()
{
char s[100];
gets(s);
int l = strlen(s);
for(int i=l-1;i>=0;i--)
S.pus...
分类:
编程语言 时间:
2015-06-09 22:00:36
阅读次数:
123