摘要: Heritage from father Time Limit : 2000/1000ms (Java/Other)Memory Limit : 131070/65535K (Java/Other)Total Submission(s) : 73Accepted Submission(s) : 26... 阅读全文
posted @ 2014-03-21 16:56 lazypark 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 算法思想:(1) 产生两个随机数(2) 产生一个运算符(3) 用户输入答案(4) 验证答案正确与否(5) 转(1) 重复执行 主函数中用到了srand(time(NULL))上百度查了一下和随机产生有关。如果在程序运行时没有自主设置种子的话,用函数rand产生的随机数序列会是一样的。而用srand设... 阅读全文
posted @ 2014-02-24 23:20 lazypark 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 算法思想:(1) 产生两个随机数(2) 产生一个运算符(3) 用户输入答案(4) 验证答案正确与否(5) 转(1) 重复执行 主函数中用到了srand(time(NULL))上百度查了一下和随机产生有关。如果在程序运行时没有自主设置种子的话,用函数rand产生的随机数序列会是一样的。而用srand设... 阅读全文
posted @ 2014-02-24 23:20 lazypark 阅读(140) 评论(0) 推荐(0) 编辑
摘要: C++ 运算符重载什么是运算符的重载?运算符与类结合,产生新的含义。为什么要引入运算符重载? 作用:为了实现类的多态性(多态是指一个函数名有多种含义)怎么实现运算符的重载?方式:类的成员函数或友元函数(类外的普通函数)规则:不能重载的运算符有 . 和 .*和 ?: 和 :: 和 sizeof友元函数... 阅读全文
posted @ 2014-02-24 23:13 lazypark 阅读(145) 评论(0) 推荐(0) 编辑
摘要: C++ 运算符重载什么是运算符的重载?运算符与类结合,产生新的含义。为什么要引入运算符重载? 作用:为了实现类的多态性(多态是指一个函数名有多种含义)怎么实现运算符的重载?方式:类的成员函数或友元函数(类外的普通函数)规则:不能重载的运算符有 . 和 .*和 ?: 和 :: 和 sizeof友元函数... 阅读全文
posted @ 2014-02-24 23:13 lazypark 阅读(125) 评论(0) 推荐(0) 编辑
摘要: A + B Problem IITime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 108Accepted Submission(s) : 21Font:... 阅读全文
posted @ 2014-02-24 23:11 lazypark 阅读(124) 评论(0) 推荐(0) 编辑
摘要: A + B Problem IITime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 108Accepted Submission(s) : 21Font:... 阅读全文
posted @ 2014-02-24 23:11 lazypark 阅读(99) 评论(0) 推荐(0) 编辑
摘要: .Integer InquiryProblem DescriptionOne of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go... 阅读全文
posted @ 2014-02-20 17:21 lazypark 阅读(108) 评论(0) 推荐(0) 编辑
摘要: .Integer InquiryProblem DescriptionOne of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go... 阅读全文
posted @ 2014-02-20 17:21 lazypark 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 求N!Problem DescriptionGiven an integer N(0 ≤ N ≤ 10000), your task is to calculate N!InputOne N in one line, process to the end of file.OutputFor each... 阅读全文
posted @ 2014-02-20 17:13 lazypark 阅读(323) 评论(0) 推荐(0) 编辑