java入门
xiaofang3a
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Max Sum
Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 +原创 2014-10-18 22:12:51 · 368 阅读 · 0 评论 -
Stars
Problem DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars tha原创 2014-08-22 16:42:29 · 411 阅读 · 0 评论 -
A + B Problem II
Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line of the input contains an integer T(1<=T<=20) wh原创 2014-10-18 18:48:59 · 291 阅读 · 0 评论 -
Let the Balloon Rise
Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest i原创 2014-10-19 14:43:03 · 426 阅读 · 0 评论 -
Prime Ring Problem
Problem DescriptionA 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 circles should be a prime.原创 2014-10-19 17:27:36 · 379 阅读 · 0 评论 -
A + B Problem
Problem DescriptionCalculate A + B.InputEach line will contain two integers A and B. Process to end of file.OutputFor each case, output A + B in one line.Sample Input1 1Sample Output原创 2014-10-18 20:05:50 · 410 阅读 · 0 评论 -
Binary Tree Traversals(二叉树)
Problem DescriptionA binary tree is a finite set of vertices that is either empty or consists of a root r and two disjoint binary trees called the left and right subtrees. There are three most impor原创 2014-10-21 13:51:20 · 424 阅读 · 0 评论 -
二叉树最大宽度和高度(java)
题目描述 Description给出一个二叉树,输出它的最大宽度和高度。输入描述 Input Description第一行一个整数n。下面n行每行有两个数,对于第i行的两个数,代表编号为i的节点所连接的两个左右儿子的编号。如果没有某个儿子为空,则为0。输出描述 Output Description输出共一行,输出二叉树的最大宽度和高度,用一个空格隔开。样原创 2014-10-21 21:45:05 · 1721 阅读 · 0 评论 -
单链表的简单实现
import java.util.Scanner;class node{ int data; node next; public node(int x) { this.data=x; this.next=null; } public node retnode() { return this; }}class LinkList{ node head; p原创 2014-11-06 21:56:06 · 350 阅读 · 0 评论
分享