码迷,mamicode.com
首页 >  
搜索关键字:gets    ( 3597个结果
266-字符串逆序输出-nyoj-20140808
#include #include int main(){ int T; scanf("%d",&T); getchar(); while(T--) { char str[45],b[45]; int m,k,i; k=0; //scanf("%s",str); gets(str); m=strle...
分类:其他好文   时间:2014-08-08 21:15:56    阅读次数:249
scanf与gets读取字符串的区别
对于编程初学者很多人对gets和scanf都没做过深入的了解,本文为大家详细说明gets和scanf的区别 gets  1、函数:gets(字符指针)   2、头文件:stdio.h(c中),c++不需包含此头文件   3、原型:char*gets(char*buffer);   4、功能:从stdin流中读取字符串,直至接受到换行符或EOF时停止,并将读取的结果存放在bu...
分类:其他好文   时间:2014-08-06 11:57:51    阅读次数:259
POJ 2886 Who Gets the Most Candies? (线段树)
Description N children are sitting in a circle to play a game. The children are numbered from 1 to N in clockwise order. Each of them has a card with a non-zero integer on it in his/her hand. The ...
分类:其他好文   时间:2014-08-04 17:57:27    阅读次数:284
poj 2886 线段树的更新+反素数
Who Gets the Most Candies?Time Limit: 5000 MS Memory Limit: 0 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status] [Discus...
分类:其他好文   时间:2014-08-04 17:13:47    阅读次数:307
POJ 2886 Who Gets the Most Candies?
题目大意是:n个人围成一圈 ,每个人有一个非零数num,为正表示在他出去以后他左边第num 个人出去,否则右边第-num个人出去,给定最开始出去的人,求第m个出去的人,其中,1 11 #include 12 #include 13 #include 14 #include 15 #inclu...
分类:其他好文   时间:2014-08-04 16:59:47    阅读次数:325
set<char*>s
#include #include #include using namespace std;int main(){ char str[10002]; while (gets(str)) { sets; s.insert("aa"); s....
分类:其他好文   时间:2014-08-02 23:24:34    阅读次数:280
sscanf()函数。
#include int main() { char str[10002]; char a[1002],b[1002]; while(gets(str)) { sscanf(str,"%s %s",a,b); printf("%s\n",a); ...
分类:其他好文   时间:2014-08-02 23:16:24    阅读次数:314
POJ - 2886 Who Gets the Most Candies? (反素数+线段树)
Description N children are sitting in a circle to play a game. The children are numbered from 1 to N in clockwise order. Each of them has a card with a non-zero integer on it in his/her hand. Th...
分类:其他好文   时间:2014-08-02 15:37:33    阅读次数:259
c语言 C++ 读一字符串
标准c语言#include //---------回车被第一个 gets(s) 接收char s[100]; // -----直接换行,,,,,少一行int main(int argc, char ...
分类:编程语言   时间:2014-08-02 01:37:52    阅读次数:259
Robberies(01背包)
Problem Description The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they become too greedy. He has decided t...
分类:其他好文   时间:2014-08-01 16:10:21    阅读次数:184
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!