码迷,mamicode.com
首页 >  
搜索关键字:eof    ( 7139个结果
hdu 4802 GPA
水题#include #include using namespace std;int main(){ int n; int c,sum1; double sum2; char str[10]; while(scanf("%d",&n)!=EOF) { ...
分类:其他好文   时间:2014-07-16 21:20:09    阅读次数:173
markdown
```cpp#includeint a[100],ans ;int main(){ int n , t = 0 ; while (scanf("%d",&n)!=EOF) { for (int i=1; i0) ; ++t ; printf("C...
分类:其他好文   时间:2014-07-16 20:46:13    阅读次数:137
暑训day1解题报告
A -Painting the sticks因为不能覆盖涂/涂两次,所以就数数有几个三个一块儿就行了。#includeint a[100],ans ;int main(){ int n , t = 0 ; while (scanf("%d",&n)!=EOF) { for (...
分类:其他好文   时间:2014-07-16 20:37:36    阅读次数:317
你不知道的多重循环的事情
当你循环输入的时候我们有几种方法 一:while(scanf("%d %d",&a,&b)!=EOF)//>0//==1 反正有很多种,但是今天早上我用两个代码提交发现了问题 相同的算法但是第一个超时 #include #include #define max 1000000+10 #include using namespace std; int a[max]; int cmp(int...
分类:其他好文   时间:2014-07-14 16:46:36    阅读次数:201
在脚本中生成配置文件
其实是个输入输出重定向的简单应用,cat>>/tmp/example.conf<<EOF >Inputathere >Youcanentermultiplelines >AndscriptisendofEOFlikebelow >EOF输出重定向到某配置文件,配置文件的内容来自输入重定向<<表示此处即文件,而非类似于>>的追..
分类:其他好文   时间:2014-07-09 08:20:57    阅读次数:188
ZOJ Monthly, October 2010 ABEFI
ZOJ 3406 Another Very Easy Task #include #include const int N = 100005; char s[N]; int main() { bool f = 0; int size = 0; char ch; while(scanf("%c", &ch)!=EOF) { if( !(ch >= 'a' && c...
分类:其他好文   时间:2014-07-08 13:52:14    阅读次数:265
NYOJ 158 省赛来了
省赛来了 时间限制:1000 ms  |  内存限制:65535 KB 难度:2 描述 一年一度的河南省程序设计大赛又要来了。 竞赛是要组队的,组队形式:三人为一队,设队长一名,队员两名。 现在问题就来了,给你m个人,要求每队n个人,求共有几种不同的组队方式。 (题目保证m%n等于0,所有数据不超出int范围) 输入多组测试数据,以EOF结束。 每组测试数据输入两个整数m,n...
分类:其他好文   时间:2014-07-08 11:01:57    阅读次数:206
水仙花数
/*Input输入数据有多组,每组占一行,包括两个整数m和n(100#includeint main(){int m,n,k,ge,shi,bai;int flag=0;while(scanf("%d%d",&m,&n)!=EOF){ flag=0; if(m>n || m999) ...
分类:其他好文   时间:2014-07-06 13:41:48    阅读次数:196
NYOJ 275 队花的烦恼一
队花的烦恼一 时间限制:3000 ms  |  内存限制:65535 KB 难度:1 描述 ACM队的队花C小+经常抱怨:“C语言中的格式输出中有十六、十、八进制输出,然而却没有二进制输出,哎,真遗憾!谁能帮我写一个程序实现输入一个十进制数n,输出它的二进制数呀?” 难道你不想帮帮她吗?^_^ 输入输入有多个数据,数据以EOF结束;每个数据ni(0 ...
分类:其他好文   时间:2014-07-06 12:40:17    阅读次数:300
一个正整数N,不用sqrt求开方数
#include int main() { int n; // 正整数n int i; // for循环 int myR = 1; // 保证myR^2 <= n < (myR+1)^2 double temp; // 临时变量 while(scanf("%d", &n) != EOF) { if (n <= 0) continue; // 寻找myR for (i=1;...
分类:其他好文   时间:2014-07-03 18:29:48    阅读次数:158
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!