上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 21 下一页
摘要: Piotr likes playing with ants. He has n of them on a horizontal pole L cm long. Each ant is facing either left or right and walks at a constant spee... 阅读全文
posted @ 2015-04-17 17:27 星斗万千 阅读(114) 评论(0) 推荐(0)
摘要: Problem A Communist regime is trying to redistribute wealth in a village. They have have decided to sit everyone around a circular table. First, ev... 阅读全文
posted @ 2015-04-17 16:31 星斗万千 阅读(94) 评论(0) 推荐(0)
摘要: There is a war and it doesn't look very promising for your country. Now it's time to act. You have a commando squad at your disposal and planning an... 阅读全文
posted @ 2015-04-17 11:58 星斗万千 阅读(119) 评论(0) 推荐(0)
摘要: Description Problem C: The Dragon of Loowater Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem. The ... 阅读全文
posted @ 2015-04-17 11:14 星斗万千 阅读(120) 评论(0) 推荐(0)
摘要: 介绍 这篇文章的目的是为了介绍std::vector,如何恰当地使用它们的成员函数等操作。本文中还讨论了条件函数和函数指针在迭代算法中使用,如在remove_if()和for_each()中的使用。通过阅读这篇文章读者应该能够有效地使用vector容器,而且应该不会再去使用C类型的动态数组了... 阅读全文
posted @ 2015-04-13 20:04 星斗万千 阅读(124) 评论(0) 推荐(0)
摘要: Pattern lock security is generally used in Android handsets instead of a password. The pattern lock can be set by joining points on a 3 × 3 matrix i... 阅读全文
posted @ 2015-04-13 16:46 星斗万千 阅读(131) 评论(0) 推荐(0)
摘要: Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. Ther... 阅读全文
posted @ 2015-04-11 21:05 星斗万千 阅读(129) 评论(0) 推荐(0)
摘要: deque双向队列是一种双向开口的连续线性空间,可以高效的在头尾两端插入和删除元素,deque在接口上和vector非常相似,下面列出deque的常用成员函数: deque的实现比较复杂,内部会维护一个map(注意!不是STL中的map容器)即一小块连续的空间,该空间中... 阅读全文
posted @ 2015-04-11 21:03 星斗万千 阅读(171) 评论(0) 推荐(0)
摘要: 你听说过角谷猜想吗? 任意的正整数,比如 5, 我们从它开始,如下规则计算: 如果是偶数,则除以2,如果是奇数,则乘以3再加1. 如此循环,最终必会得到“1” ! 比如 5 的处理过程是: 5 16 8 4 2 1 一个正整数经过多少步才能变成1, 称为角谷步数。 对于5而言,步数也是5 对于... 阅读全文
posted @ 2015-04-10 10:26 星斗万千 阅读(246) 评论(0) 推荐(0)
摘要: 5个砝码 用天平称重时,我们希望用尽可能少的砝码组合称出尽可能多的重量。 如果只有5个砝码,重量分别是1,3,9,27,81。则它们可以组合称出1到121之间任意整数重量(砝码允许放在左右两个盘中)。 本题目要求编程实现:对用户给定的重量,给出砝码组合方案。 例如: 用户输入: 5 程序输出:... 阅读全文
posted @ 2015-04-09 11:21 星斗万千 阅读(492) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 21 下一页