http://acm.hdu.edu.cn/showproblem.php?pid=3172题意:输出每对朋友的关系网大小并查集的时候维护一个数组记录根节点的大小即可,水题,这题坑在T组数据这个也要读到EOF,开始莫名其妙wa...#include #include #include #includ...
分类:
其他好文 时间:
2014-11-27 00:10:19
阅读次数:
295
# include void main (){ int c; while ((c=getchar())!=EOF) putchar(c);//printf("hello world!\c");}EOF的是为-1# include void main (){ int c...
分类:
其他好文 时间:
2014-11-26 22:20:00
阅读次数:
185
rem@echooff
SETLOCALENABLEDELAYEDEXPANSION
setk=speed_dao_mmr_20141016_300008588738_2200125875
call:PosLastChar%k%_aa
echo%aa%
pause
goto:eof
rem:poscharstrtagRes
:PosChar
setSubStr=
setF=0
setTmpVar=%1
set%3=-1
:pos_begin
setSubStr=!TmpVar:~%F%,1!
ifnotd..
分类:
其他好文 时间:
2014-11-26 19:17:24
阅读次数:
243
Lisa
这个傲娇的计算器叫Lisa。
/*********************************************************
Code writer : EOF
Code file : stack.h
Code date : 2014.11.26
Email : jasonleaster@gmail.com
...
分类:
其他好文 时间:
2014-11-26 18:54:48
阅读次数:
221
#include /*copy input to output; 2nd version*/main(){intc;c=getchar();while(c !=EOF){putchar(c);c=getchar();}} 直觉告诉我getchar返回值应该是char类型的,这个地方为什么不能用ch....
分类:
其他好文 时间:
2014-11-25 18:18:53
阅读次数:
111
int Read(void)
{
unsigned int rc,i,get;
FILE *fp;
fp = fopen("E:\\name.txt","r"); /*以只读的方式打开*/
if(fp == NULL)
{
return -1;
}
rc = 0;
i = 0;
while((get = fgetc(fp))!=EOF) /*从fp指...
分类:
其他好文 时间:
2014-11-23 23:17:05
阅读次数:
272
#includeint main (){ #ifdef ONLINE_JUDGE #else freopen ("in.txt","r",stdin); #endif int n,i; while(scanf("%d",&n)!=EOF){ int a[n],s=1; for ...
分类:
其他好文 时间:
2014-11-23 23:01:45
阅读次数:
171
#includeint main (){ #ifdef ONLINE_JUDGE #else freopen ("in.txt","r",stdin); #endif int n,m; int a[101]; while(scanf("%d",&n)!=EOF&&(na[k+1])...
分类:
其他好文 时间:
2014-11-23 22:52:28
阅读次数:
245
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1395可以用欧拉定理证明其存在性。欧拉定理是这样的:如果a和m互质且a 2 int main() 3 { 4 int n; 5 while (scanf("%d", &n) != EOF){ ...
分类:
其他好文 时间:
2014-11-21 20:27:16
阅读次数:
198
getchar()函数的输入方式在程序中使用getchar()读取字符、程序遇到的输入会先被放到一个输入缓冲队列中,直到程序读到了\n或EOF,程序才将\n或EOF前读到的字符赋值给变量。赋值是一个字符一个字符进行的,而getchar()是一个一个字符读取的,当输入缓冲队列中还有字符,getchar...
分类:
其他好文 时间:
2014-11-21 13:55:31
阅读次数:
128