自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Code for ACM

Just for fun

  • 博客(12)
  • 收藏
  • 关注

原创 java中对象的初始化与构造器

例子:一个天体数据类: class Body { public long idNum; public String name; public Body orbits; public static long nextID; }可以做天体对象的创建与初始化: Body Sun = new Body(); Sun.idNum = Body.nextID++; Sun.name = "Sol

2014-02-25 20:58:47 684

原创 hdoj1002--A + B Problem II

Problem Description I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. Input The first line of the input contains an integer T(1<=T<=

2014-02-25 11:05:20 482

原创 hdoj1021--Fibonacci Again

Problem Description There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2). Input Input consists of a sequence of lines, each containing an integer n.

2014-02-24 11:49:43 449

原创 hdoj1020--Encoding

Problem Description Given a string containing only 'A' - 'Z', we could encode it using the following method: 1. Each sub-string containing k same characters should be encoded to "kX" where "X" i

2014-02-24 11:35:42 490

原创 hdoj1019--Least Common Multiple

Problem Description The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and 1

2014-02-24 10:25:43 437

原创 hdoj1017--A Mathematical Curiosity

Problem Description Given two integers n and m, count the number of pairs of integers (a,b) such that 0 This problem contains multiple test cases! The first line of a multiple input is an inte

2014-02-11 11:43:11 556

原创 杭电试题分类题解

基础题:1000、1001、1004、1005、1008、1012、1013、1014、1017、1019、1021、1028、1029、1032、1037、1040、1048、1056、1058、1061、1070、1076、1089、1090、1091、1092、1093、1094、1095、1096、1097、1098、1106、1108、1157、1163、1164、1170、1194、1

2014-02-11 11:02:18 712

原创 hdoj1018--Big Number

Problem Description In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are

2014-02-11 00:03:40 466

原创 hdoj1012--u Calculate e

Problem Description A simple mathematical formula for e is where n is allowed to go to infinity. This can actually yield very accurate approximations of e using relatively small values of n.

2014-02-10 20:17:49 567

原创 acm输入输出

输入和输出处理 试题一般采用标准输入和输出方式读取输入和产生输出,在题目中会详细描述输入和输出的格式和值域范围,所写的程序一定要严格遵守题目指定的输入输出格式。 在比赛试题的输入和输出处理上,针对一些常见的情形,有一些常用的方法。 1、多测试用例的输入和输出 有些试题在一次输入中只包含一个测试用例,也就是说,程序每运行一次,只算一道题。也有些试题在一次输入中包含多个测试用例,也

2014-02-10 15:32:48 614

原创 acm比赛注意事项

1.服务器不支持long double类型,最高支持到double(浮点型)和long long(长整型),注意 double 比float 更适宜。 2.while语句中的(cin>>M>>N && M!=0 && N!=0)(注意是与还是或)上式也可改写成(cin>>M>>N && (M || N))   3.在有些题目,特别是数据比较烦的时候,或者数据精度要求高的时候,可能精度

2014-02-10 13:49:06 817

原创 hdoj1000--A + B Problem

A + B Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 375449 Accepted Submission(s): 118575 Problem Description Calculate A + B.

2014-02-10 11:08:32 460

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除