摘要: java.math 类 BigIntegerjava.lang.Object java.lang.Number java.math.BigInteger所有已实现的接口:Serializable, Comparable<BigInteger>public class BigIntegerextends Numberimplements Comparable<BigInteger>不可变的任意精度的整数。所有操作中,都以二进制补码形式表示 BigInteger(如 Java 的基本整数类型)。BigInteger 提供所有 Java 的基本整数操作符的对应物,并提供 ja 阅读全文
posted @ 2012-05-31 11:56 cseriscser 阅读(497) 评论(0) 推荐(0) 编辑
摘要: java.math 类 BigDecimaljava.lang.Object java.lang.Number java.math.BigDecimal所有已实现的接口:Serializable, Comparable<BigDecimal>p lic class BigDecimalextends Numberimplements Comparable<BigDecimal>不可变的、任意精度的有符号十进制数。BigDecimal 由任意精度的整数非标度值 和 32 位的整数标度 (scale) 组成。如果为零或正数,则标度是小数点后的位数。如果为负数,则将该数的非标 阅读全文
posted @ 2012-05-31 11:52 cseriscser 阅读(979) 评论(0) 推荐(0) 编辑
摘要: 字段摘要staticBigIntegerONEBigInteger的常量1。staticBigIntegerTENBigInteger的常量10。staticBigIntegerZEROBigInteger的常量0。构造方法摘要BigInteger(byte[]val)将包含BigInteger的二进制补码表示形式的byte数组转换为BigInteger。BigInteger(intsignum,byte[]magnitude)将BigInteger的符号-数量表示形式转换为BigInteger。BigInteger(intbitLength,intcertainty,Randomrnd)构造 阅读全文
posted @ 2012-05-31 11:48 cseriscser 阅读(475) 评论(0) 推荐(0) 编辑
摘要: 方法摘要static<T>List<T>asList(T...a)返回一个受指定数组支持的固定大小的列表。staticintbinarySearch(byte[]a,bytekey)使用二分搜索法来搜索指定的byte型数组,以获得指定的值。staticintbinarySearch(byte[]a,intfromIndex,inttoIndex,bytekey)使用二分搜索法来搜索指定的byte型数组的范围,以获得指定的值。staticintbinarySearch(char[]a,charkey)使用二分搜索法来搜索指定的char型数组,以获得指定的值。statici 阅读全文
posted @ 2012-05-31 11:47 cseriscser 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 字段摘要staticdoubleE比任何其他值都更接近e(即自然对数的底数)的double值。staticdoublePI比任何其他值都更接近pi(即圆的周长与直径之比)的double值。方法摘要staticdoubleabs(doublea)返回double值的绝对值。staticfloatabs(floata)返回float值的绝对值。staticintabs(inta)返回int值的绝对值。staticlongabs(longa)返回long值的绝对值。staticdoubleacos(doublea)返回一个值的反余弦;返回的角度范围在0.0到pi之间。staticdoubleasin 阅读全文
posted @ 2012-05-31 11:46 cseriscser 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 字段摘要staticBigDecimalONE值为1,标度为0。staticintROUND_CEILING接近正无穷大的舍入模式。staticintROUND_DOWN接近零的舍入模式。staticintROUND_FLOOR接近负无穷大的舍入模式。staticintROUND_HALF_DOWN向“最接近的”数字舍入,如果与两个相邻数字的距离相等,则为上舍入的舍入模式。staticintROUND_HALF_EVEN向“最接近的”数字舍入,如果与两个相邻数字的距离相等,则向相邻的偶数舍入。staticintROUND_HALF_UP向“最接近的”数字舍入,如果与两个相邻数字的距离相等,则为 阅读全文
posted @ 2012-05-31 11:46 cseriscser 阅读(1450) 评论(0) 推荐(0) 编辑
摘要: 构造方法摘要StringBuffer()构造一个其中不带字符的字符串缓冲区,其初始容量为16个字符。StringBuffer(CharSequenceseq)publicjava.lang.StringBuilder(CharSequenceseq)构造一个字符串缓冲区,它包含与指定的CharSequence相同的字符。StringBuffer(intcapacity)构造一个不带字符,但具有指定初始容量的字符串缓冲区。StringBuffer(Stringstr)构造一个字符串缓冲区,并将其内容初始化为指定的字符串内容。方法摘要StringBufferappend(booleanb)将boo 阅读全文
posted @ 2012-05-31 11:45 cseriscser 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 字段摘要staticComparator<String>CASE_INSENSITIVE_ORDER一个对String对象进行排序的Comparator,作用与compareToIgnoreCase相同。构造方法摘要String()初始化一个新创建的String对象,使其表示一个空字符序列。String(byte[]bytes)通过使用平台的默认字符集解码指定的byte数组,构造一个新的String。String(byte[]bytes,Charsetcharset)通过使用指定的charset解码指定的byte数组,构造一个新的String。String(byte[]ascii, 阅读全文
posted @ 2012-05-31 11:45 cseriscser 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 1 package javaapplication2; 2 import java.util.*; 3 import java.math.*; 4 5 class nn{ 6 public int age; 7 }//自定义的类; 8 class cmp implements Comparator{//比较器的定义;要import java.util.*;语句; 9 public int compare(Object i,Object j)10 {nn a=(nn)i;11 nn b=(nn)j;12 if(a.age<b.age)13 ... 阅读全文
posted @ 2012-05-31 11:44 cseriscser 阅读(965) 评论(0) 推荐(0) 编辑
摘要: Curling 2.0Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4112Accepted: 1699DescriptionOn Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on an ice game board on which a square mesh is marked. 阅读全文
posted @ 2012-05-31 11:42 cseriscser 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 棋盘问题Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 8895Accepted: 4278Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k <= n 当为-1 -1时表示输入结束 阅读全文
posted @ 2012-05-31 11:41 cseriscser 阅读(353) 评论(0) 推荐(0) 编辑
摘要: A Knight's JourneyTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 11297Accepted: 3773DescriptionBackground The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. Whenever a knight moves, it is two square 阅读全文
posted @ 2012-05-31 11:40 cseriscser 阅读(150) 评论(0) 推荐(0) 编辑
摘要: SticksTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 72127Accepted: 15839DescriptionGeorge took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the original state, but he forgot how many sticks he had originall. 阅读全文
posted @ 2012-05-31 11:39 cseriscser 阅读(196) 评论(0) 推荐(0) 编辑
摘要: Catch That CowTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 18320Accepted: 5630DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100. 阅读全文
posted @ 2012-05-31 11:38 cseriscser 阅读(188) 评论(0) 推荐(0) 编辑
摘要: Find The MultipleTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 7103Accepted: 2952Special JudgeDescriptionGiven a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater t. 阅读全文
posted @ 2012-05-31 10:02 cseriscser 阅读(220) 评论(0) 推荐(0) 编辑
摘要: PotsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4011Accepted: 1689Special JudgeDescriptionYou are given two pots, having the volume of A and B liters respectively. The following operations can be performed:FILL(i) fill the pot i (1 ≤ i ≤ 2) from the tap;DROP(i) empty the pot i to the d. 阅读全文
posted @ 2012-05-31 10:01 cseriscser 阅读(433) 评论(0) 推荐(0) 编辑
摘要: Children of the Candy CornTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4063Accepted: 1850DescriptionThe cornfield maze is a popular Halloween treat. Visitors are shown the entrance and must wander through the maze facing zombies, chainsaw-wielding psychopaths, hippies, and other terrors. 阅读全文
posted @ 2012-05-31 10:00 cseriscser 阅读(277) 评论(0) 推荐(0) 编辑
摘要: Network SaboteurTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 4515Accepted: 1889DescriptionA university network is composed of N computers. System administrators gathered information on the traffic between nodes, and carefully divided the network into two subnetworks in order to minimize. 阅读全文
posted @ 2012-05-31 09:58 cseriscser 阅读(256) 评论(0) 推荐(0) 编辑
摘要: Channel AllocationTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 6071Accepted: 3108DescriptionWhen a radio station is broadcasting over a very large area, repeaters are used to retransmit the signal so that every receiver has a strong signal. However, the channels used by each repeater mu. 阅读全文
posted @ 2012-05-31 09:57 cseriscser 阅读(214) 评论(0) 推荐(0) 编辑
摘要: Shredding CompanyTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 1807Accepted: 1037DescriptionYou have just been put in charge of developing a new shredder for the Shredding Company Although a "normal" shredder would just shred sheets of paper into little pieces so that the conten 阅读全文
posted @ 2012-05-31 09:56 cseriscser 阅读(165) 评论(0) 推荐(0) 编辑