码迷,mamicode.com
首页 >  
搜索关键字:puts    ( 2099个结果
POJ2452---Sticks Problem(单调栈+RMQ,方法不够优秀)
Description Xuanxuan has n sticks of different length. One day, she puts all her sticks in a line, represented by S1, S2, S3, …Sn. After measuring the length of each stick Sk (1 <= k <= n), she finds...
分类:其他好文   时间:2015-05-15 21:31:42    阅读次数:480
【BZOJ1071】【SCOI2007】组队 利用单调性的双指针
链接: #include int main() { puts("转载请注明出处[vmurder]谢谢"); puts("网址:blog.csdn.net/vmurder/article/details/43407071"); } 题解: 三个定义:高度h,v速度,Ah+Bv为s 首先我们在外圈枚举来固定其中一个权值,姑且枚举v吧。每次枚举值大写为V。 然后在内圈就可...
分类:其他好文   时间:2015-05-15 17:50:57    阅读次数:211
掌握string.h里的常用函数
字符串输出函数 puts格式: puts(字符数组名)功能:把字符数组中的字符串输出到显示器。 即在屏幕上显示该字符串。字符串输入函数 gets格式: gets (字符数组名)功能:从标准输入设备键盘上输入一个字符串。本函数得到一个返回值,即为该字符数组的首地址。1 #include"stdio.h...
分类:其他好文   时间:2015-05-13 21:37:42    阅读次数:120
foobar2000 – ELPlaylist
布局抄自MonoLite_Plus_0_4_3_by_Junior_Spirit,皮肤也是用的他的 Track List: //背景颜色 播放、播放+焦点、焦点、奇偶 $if(%el_isplaying%, $if(%el_focused%,$puts(backgroung_color,%B_col...
分类:其他好文   时间:2015-05-07 12:16:18    阅读次数:308
C语言:void指针
使用前必须进行强制类型转换#include void test(const void *p);int main(){ int i = 123; int *p = &i; puts("my test:"); test(p);}void test(...
分类:编程语言   时间:2015-05-03 23:37:03    阅读次数:173
读取文本文件中某一行
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<unistd.h> #include<windows.h> #defineMAX256 intmain(void) { FILE*fa; inti,count=0; charch[MAX],file[MAX]="1.txt"; if((fa=fopen(file,"r"))==NULL) { puts("不能打开..
分类:其他好文   时间:2015-04-29 17:24:16    阅读次数:156
Codeforces Round #153 (Div. 1)BPlaying with Permutations
//可以看出操作1和操作2是一对互逆操作 //即是一次操作1和一次操作2执行后,排列不变 //如果一种操作连续做i次能得到s //如果i刚好等于k,puts("YES") //如果不等,看剩下的k-i次操作能不能用一次操作1和一次操作2做完 #include #include #include using namespace std ; const int maxn  = 110...
分类:其他好文   时间:2015-04-27 21:53:32    阅读次数:108
对一个字符数组连续用gets函数出现的问题(缓冲区内容补充)
昨天调试程序(见下面代码)遇到下面一个问题: #include int main() { int i = 1; while(i) { char str[100]; printf("please input a str:\n"); gets(str); puts(str); printf("continue:1,break:0\n"); scanf("%...
分类:编程语言   时间:2015-04-27 09:59:03    阅读次数:263
《c primer plus》编程练习回顾-第十一章(上)
1.#include void input(char *p, int b); int main(void) { char ch[60]; int n; printf("Please input the number:"); scanf("%d", &n); getchar(); input(ch, n); puts(ch);...
分类:其他好文   时间:2015-04-20 00:40:07    阅读次数:138
nyoj 1057寻找最大数(三) 贪心
#include #include int main(){ char temp,str[20]; int k,len,mark,flag,j; while(scanf("%s %d",str,&k)!=EOF){ len=strlen(str); if(k==0) { puts(str); continue; } for(int i=0;i<len;i++...
分类:其他好文   时间:2015-04-15 21:34:42    阅读次数:139
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!