
Java编程能力强化
Java_Web_Book
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
ACM模拟题讲解(1)-高精度
Java中提供了byte、short、int和long表示整数,float和double来表示浮点数,每种类型都有一定的表示范围,当超过了这个范围之后就不能处理了。为了提供对非常大的整数和浮点数的处理,Java提供了BigDecimal和BigInteger。下面的代码演示了BigDecimal和BigInteger的基本用法: BigDecimal data1 = new BigDecima...2010-07-13 13:01:00 · 257 阅读 · 0 评论 -
给学生的思考题(第2周)
8月31日 编写方法,根据用户给定的字符串解析出结果。已知:用户给出的字符串只包括数字、加减乘除符号,并且是合法的数学表达式。例如: 35+3 2*3+3-4*6 -7+10*3/4+6*2-7/2 9月1日 想一个好的例子来解释多态的概念。 9月2日 编写一个学生类,学生类包括属性学号、姓名和班级,并编写模拟方法添加学生、删除学生、修改学生和查询学生。 9月3日 ...2009-09-07 13:12:00 · 134 阅读 · 0 评论 -
给学生的思考题(每日一题)
8月24日:如何使用Java实现链表; 8月25日:编写一个方法判断一个字符串在另外一个字符串中出现的次数; 8月26日:编写SQL语句 表结构如下: sid(学号) cid(课程号) s(成绩) 0011 1 77 0011 2 78 0011 3 68 0012 1 70 ... 已知有3门课,课程号分别为:1,2,3 要求查询结果为: sid 课程1成绩 课...2009-08-28 08:56:00 · 164 阅读 · 0 评论 -
ACM详解(10)——辽宁省赛(上)
第一题:Dinner Timelimit: 1sMemorylimit:32M Description Little A is one member of ACM team. He had just won the gold in World Final. To celebrate, he decided to invite all to have one meal. As bowl, k...2010-07-25 17:52:00 · 218 阅读 · 0 评论 -
ACM详解(9)——其他
有时候会考一些锻炼基本能力的题目,下面使用几个例子进行简单分析。 1、IP Address Description Suppose you are reading byte streams from any device, representing IP addresses. Your task is to convert a 32 characters long sequence o...2010-07-23 19:25:00 · 219 阅读 · 0 评论 -
ACM详解(8)——加密
比赛的时候告诉你简单的加密算法,让你完成加密或者解密操作,下面通过几个简单例子介绍。 1、Message Decowding Description The cows are thrilled because they've just learned about encrypting messages. They think they will be able to use secret m...2010-07-23 19:24:00 · 219 阅读 · 0 评论 -
ACM详解(7)——压缩与编码
有些题目会给出一些简单的压缩方法或者编码方法,让你实现具体的算法。下面通过题目分析。 1、Parencodings Description Let S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways: By an integer sequence P ...2010-07-23 19:22:00 · 174 阅读 · 0 评论 -
ACM详解(6)——栈
堆栈是一种特殊的线性结构,后进先出,只能对栈顶元素操作,典型的操作入栈和出站。下面通过例子介绍基本用法。 题目:Train Problem Problem Description As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get ba...2010-07-19 11:29:00 · 169 阅读 · 0 评论 -
ACM详解(5)——排序
有些ACM题需要使用一些基本的数据结构,下面首先介绍与排序相关的内容。 1、基本排序 Problem Description These days, I am thinking about a question, how can I get a problem as easy as A+B? It is fairly difficulty to do such a thing. Of c...2010-07-19 11:27:00 · 156 阅读 · 0 评论 -
ACM模拟题详解(4)——递归
递归在解决一些问题的时候非常直观,但是在是使用递归的时候要注意递归的深度,如果深度太深,可能会造成堆栈溢出。下面通过实例介绍如何使用。 题目:超级楼梯 Problem Description 有一楼梯共M级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第M级,共有多少种走法? Input 输入数据首先包含一个整数N,表示测试实例的个数,然后是N行数据,每行包含一个整数M(...2010-07-15 14:26:00 · 123 阅读 · 0 评论 -
ACM模拟题详解(3)——数论(续)
5、Prime Ring Problem Problem Description A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent cir...2010-07-15 14:12:00 · 178 阅读 · 0 评论 -
ACM模拟题详解(3)——数论(续)
5、Prime Ring Problem Problem Description A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent cir...2010-07-15 14:11:00 · 155 阅读 · 0 评论 -
ACM模拟题详解(2)——简单数论
有很多与数字相关的题目,主要考察基本的编程能力,如果数学比较好,对于解决这些问题有比较好的帮助。下面的题目是学生收集的题目,我进行了讲解。 1、Self Numbers Description In 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers....2010-07-14 09:58:00 · 226 阅读 · 0 评论 -
近期选拔赛的试题
题目如下: 1、编程输出日历。已知2011年3月18日是星期五,根据用户输入的月份(2011年),输出日历。 例如,输入为3的时候输出: 日 一 二 三 四 五 六 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ...2011-03-20 16:07:33 · 196 阅读 · 0 评论