摘要: 这两题比较简单,就不做分析了,描述下题目,就上代码吧。 【题目描述】 1003,其实就是求这个方程的最小n:1/2 + 1/3 + 1/4 + ... + 1/(n + 1) >= c; 1004,其实就是算个平均数,直接除12 【附:完整代码】 1003题: /* POJ-1003 Hangover */ #include using namespace std; int main(... 阅读全文
posted @ 2014-11-15 15:46 xGrey 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 【题目描述】大写字母(除了Q、Z)映射到2~9,具有相同标准格式(###-####)的为相同号码。以标准格式,按字典升序输出重复的号码。【思路分析】1. 存储结构为了加快查找速度,采用无冲突的哈希表存这些7位数,故需要 long hashTable[10000000] 来存储每个号码的出现次数。由于... 阅读全文
posted @ 2014-11-15 15:37 xGrey 阅读(413) 评论(0) 推荐(0) 编辑
摘要: 【题目描述】给定R与n,求Rn的精确值,其中(0.0 0){ if (n % 2== 1) { result = result * number; } number = number * number; n = n / 2;}【小结】这道题的知识点就在于高... 阅读全文
posted @ 2014-11-15 14:50 xGrey 阅读(915) 评论(0) 推荐(0) 编辑
摘要: 读书笔记请见Github博客:http://wuxichen.github.io/Myblog/reading/2014/10/04/LearningPython.html 阅读全文
posted @ 2014-11-13 15:32 xGrey 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 读书笔记请见Github博客:http://wuxichen.github.io/Myblog/reading/2014/10/06/CleanCode.html 阅读全文
posted @ 2014-11-13 15:28 xGrey 阅读(416) 评论(0) 推荐(0) 编辑
摘要: 请见Github博客:http://wuxichen.github.io/Myblog/linux/2014/10/11/LinuxEnvironmentVariables.html 阅读全文
posted @ 2014-11-13 15:26 xGrey 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 请见Github博客:http://wuxichen.github.io/Myblog/timeseries/2014/09/02/RJavaonLinux.html 阅读全文
posted @ 2014-11-13 15:24 xGrey 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 请见Github博客:http://wuxichen.github.io/Myblog/php/2014/10/10/DebianApacheSetting.html 阅读全文
posted @ 2014-11-13 15:23 xGrey 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 请见Github博客: http://wuxichen.github.io/Myblog/htmlcss/2014/09/01/JFreechartLinechart.html 阅读全文
posted @ 2014-11-13 15:22 xGrey 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 请见Github博客: http://wuxichen.github.io/Myblog/php/2014/09/01/WeiboRenrenAuthentication.html 阅读全文
posted @ 2014-11-13 15:20 xGrey 阅读(141) 评论(0) 推荐(0) 编辑