![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
OJ训练
文章平均质量分 81
Zoor
这个作者很懒,什么都没留下…
展开
-
POJ_1657:棋盘上的距离
1、问题描述:Description国际象棋的棋盘是黑白相间的8 * 8的方格,棋子放在格子中间。如下图所示: 王、后、车、象的走子规则如下: 王:横、直、斜都可以走,但每步限走一格。 后:横、直、斜都可以走,每步格数不受限制。 车:横、竖均可以走,不能斜走,格数不限。 象:只能斜走,格数不限。写一个程序,给定起始位置和目标位置,计算原创 2012-06-30 10:58:59 · 1222 阅读 · 0 评论 -
POJ1017_装箱问题
DescriptionA factory produces products packed in square packets of the same height h and of the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These products are always delivered to customers in the square p原创 2012-06-30 20:36:21 · 2361 阅读 · 0 评论 -
百练2010D: 括号描述问题
描述:Let S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways:q By an integer sequence P = p1 p2...pn where pi is the number of left parentheses before the it原创 2012-07-07 00:19:20 · 552 阅读 · 0 评论 -
WOJ中大整数幂乘的处理(BigInteger/字符串数组表示/幂乘法)
最近看《java核心技术卷I》,开篇几章就提到了BigInteger类,查了下相关文档,在不考虑其效率的时候,用作处理WOJ中的大整数还是挺有效的(BigInteger类可以存储任意大小的数)。先链接两个比较好的博文:浅谈 BigInteger 再谈 BigInteger - 使用快速傅里叶变换示例几个题目:Problem 1142 - Half of and a Half原创 2012-12-25 15:01:06 · 3029 阅读 · 1 评论 -
Java HashMap的使用
最近在编码中经常用到HashMap,所得到的了解也仅限于《Java核心技术卷I》上面关于Map的简单介绍(get、put方法),但是对其背后具体实现尚没有了解。这个博文比较详细的说明了源码中HashMap的实现原理,java中HashMap详解 简而言之就是一句关键话:当向 HashMap 中添加 key-value 对,由其 key 的 hashCode() 返回值决定该 key原创 2013-01-02 20:50:39 · 832 阅读 · 0 评论