码迷,mamicode.com
首页 >  
搜索关键字:eof    ( 7139个结果
getchar()&putchar()&stdio.h
getchar():从stdio流中读字符。eof(end of file):文件结束符,在while循环中以eof作为文件结束标志。可以是文件(file),这种以EOF作为文件结束标志的文件必须是文本文件,在文本本件中,数据都是以字符的 ASCII代码值的形式存放,我们知道ASCII代码值的范围0...
分类:其他好文   时间:2015-01-30 01:23:10    阅读次数:162
HDU 3006
#include #include int mark[1<<16]; int main() { int i,j,n,m,k,t,tot; while(scanf("%d%d",&n,&m)!=EOF) { memset(mark,0,sizeof(mark)); for(i=1;i<=n;i++) { scanf("%d",&t); tot=0; for(j=1...
分类:其他好文   时间:2015-01-29 19:33:50    阅读次数:166
HDU 4628 状态压缩
//又被题虐了MD #include #include char ch[18]; int dis[(1 int min(int a,int b) { if(a return b; } int main() { int i,j,n,m; while(scanf("%d",&n)!=EOF) { scanf("%s",ch); int len=strlen(ch); ...
分类:其他好文   时间:2015-01-29 17:48:59    阅读次数:208
hdu 1171 母函数
#include #include #include #define MAX 250010 //注意得开大点int c1[MAX], c2[MAX];int num[55], val[55];int main(){ int n; while( scanf("%d", &n)!=EOF && n>0)...
分类:其他好文   时间:2015-01-29 13:58:43    阅读次数:159
stl set使用
#include #include #include using namespace std;int main(){ int n,m; while(scanf("%d%d",&n,&m)!=EOF && n!=-1 && m!=-1) { set R_num; set B_num; for(int ...
分类:其他好文   时间:2015-01-29 12:26:18    阅读次数:173
《算法竞赛入门经典第二版》 P35 习题2-4 子序列的和(subsequence)
/*《算法竞赛入门经典第二版》 P35 习题2-4; 输入两个正整数 n int main(){ int m,n,i,j=1; while(scanf("%d%d",&m,&n) != EOF) { double sum = 0; ...
分类:编程语言   时间:2015-01-28 23:57:43    阅读次数:955
linux之C编程学习——EOF
EOF是 End Of File 的缩写。在C语言中,它是在标准库中定义的一个宏。多数人认为文件中有一个EOF,用于表示文件的结尾。但这个观点实际上是错误的,在文件所包含的数据中,并没有什么文件结束符。对getc 而言,如果不能从文件中读取,则返回一个整数-1,这就是所谓的EOF。返回 EOF .....
分类:系统相关   时间:2015-01-28 19:17:06    阅读次数:224
Haffman Code
Haffman Code 什么是Haffman编码?以后再说,嘿嘿先上实现。 Python 实现: 在这个实现当中,我们并没有统计文本的字符出现频率,仅仅是为Haffman Coding的一个demo. """ Code writer : EOF Code file : haffman.py Code date : 2015.01.28 e-mail ...
分类:其他好文   时间:2015-01-28 14:38:43    阅读次数:145
(转)PHP EOF(heredoc)的使用方法
Heredoc技术,在正规的PHP文档中和技术书籍中一般没有详细讲述,只是提到了这是一种Perl风格的字符串输出技术。但是现在的一些论坛程序,和部分文章系统,都巧妙的使用heredoc技术,来部分的实现了界面与代码的准分离,phpwind模板就是一个典型的例子。如下: ...
分类:Web程序   时间:2015-01-28 09:37:46    阅读次数:143
UNIX,基础知识,文件IO,文件和目录
2015.1.27星期二,早晨阴天,中午下雪了今天上午老师不上课,程序语句,记一下:main(void){ int c; while((c = getc(stdin)) != EOF) if(putc(c,stdout) == EOF) 将字符写到标准输出 err_sys("output ...
分类:其他好文   时间:2015-01-27 23:28:32    阅读次数:220
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!