上一页 1 ··· 85 86 87 88 89 90 91 92 93 ··· 119 下一页
摘要: kiki's gameTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 40000/1000 K (Java/Others)Total Submission(s): 3808 Accepted Submission(s): 2210Proble... 阅读全文
posted @ 2012-09-02 20:50 加拿大小哥哥 阅读(675) 评论(0) 推荐(0)
摘要: Octorber 21stTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1500 Accepted Submission(s): 977Problem DescriptionHDU's 50th birthday, on Octorber 21st, is coming. What an exciting day!! As a student of HDU, I always want to know how many days a 阅读全文
posted @ 2012-09-02 18:36 加拿大小哥哥 阅读(251) 评论(0) 推荐(0)
摘要: The number of divisors(约数) about Humble NumbersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1708 Accepted Submission(s): 833Problem DescriptionA number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 阅读全文
posted @ 2012-09-02 18:05 加拿大小哥哥 阅读(296) 评论(0) 推荐(0)
摘要: EquationsTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3188 Accepted Submission(s): 1247Problem... 阅读全文
posted @ 2012-09-02 17:42 加拿大小哥哥 阅读(412) 评论(0) 推荐(1)
摘要: setbuf 函数名: setbuf 功 能: 把缓冲区与流相联 用 法: void setbuf(FILE *steam, char *buf); (File *stream,char *buf)设置流使用 buf缓冲区 ,若buf为NULL,则不使用缓冲区 说明:setbuf函数具有打开和关闭缓冲机制。为了带缓冲进行I/O,参数buf必须指向一个长度为BUFSIZ(定义在stdio.h头文件中)的缓冲区。通常在此之后该流就是全缓冲的,但是如果该流与一个终端设备相关,那么某些系统也可以将其设置为行缓冲。为了关闭缓冲,可以将buf参数设置为NULL。 程序例: #include... 阅读全文
posted @ 2012-09-02 16:04 加拿大小哥哥 阅读(1015) 评论(0) 推荐(0)
摘要: 士兵队列训练问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2020 Accepted Submission(s): 885Problem Description某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢,继续从头开始进行一至二报数。。。,以后从头开始轮流进行一至二报数、一 阅读全文
posted @ 2012-09-02 15:25 加拿大小哥哥 阅读(1047) 评论(0) 推荐(0)
摘要: 两车追及或相遇问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 598 Accepted Submission(s): 174Problem Description外号叫“猪头三”的小学生在数学课上,经常遇到两车相遇或追及的方程题,经过长时间的练习,他发现了许多规律,然而他不懂计算机,他想请你帮忙编写一个计算机程序,解决他的问题。题目的描述是这样的:甲、乙两地相距L公里,A车的速度为VA公里/小时,B车的速度为VB公里/小时,A车和B车开始 阅读全文
posted @ 2012-09-02 14:25 加拿大小哥哥 阅读(566) 评论(0) 推荐(0)
摘要: Game of ConnectionsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2101 Accepted Submission(s): 1208Problem DescriptionThis is a small but ancient game. You are supposed to write down the numbers 1, 2, 3, ... , 2n - 1, 2n consecutively in clockwis 阅读全文
posted @ 2012-08-30 20:23 加拿大小哥哥 阅读(629) 评论(0) 推荐(1)
摘要: 1 //作用域与可见性 2 #include<iostream> 3 using namespace std; 4 int i; //文件作用域 5 int main() 6 { i=5; 7 { int i; //块作用域 8 i=7; 9 cout<<"i="<<i<<endl; //输出710 }11 cout<<"i="<<i; //输出512 // while(1);13 return 0;14 }15 16 17 18 //对象的生存期19 #include<ios 阅读全文
posted @ 2012-08-30 18:41 加拿大小哥哥 阅读(391) 评论(0) 推荐(0)
摘要: 1 类是一种用户自定义类型,声明形式: 2 class 类名称 3 { 4 public: 5 公有成员(外部接口) 6 private: 7 私有成员 8 protected: 9 保护型成员 10 } 11 12 13 钟表类: 14 class Clock 15 { 16 public: void SetTime(int NewH,int NewM,int NewS); 17 ... 阅读全文
posted @ 2012-08-30 16:42 加拿大小哥哥 阅读(797) 评论(0) 推荐(0)
上一页 1 ··· 85 86 87 88 89 90 91 92 93 ··· 119 下一页