原创 hdu oj 1203 I NEED A OFFER!(揹包)

I NEED A OFFER! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(

原创 hd oj1285 確定比賽名次

題目地址:點擊打開鏈接 確定比賽名次 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submissio

原创 hduoj 3466 Proud Merchants(揹包)

Proud Merchants Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others) Total Submission

原创 String StringBuffer StringBuilder之間的== 和equals

String b="hello world"; 和 String c=new String("hello world");的區別 String s="abce"是一種非常特殊的形式,和new 有本質的區別.它是java中唯一不需要new

原创 可變長參數

什麼是Java可變參數 可變參數是Java 1.5引入的一個特性,它允許一個方法接受任意數量的參數。 class Q25 {     public static void print(String... s) {//實際上,s是一個字

原创 static關鍵字

static關鍵字 代碼示例: import static org.quartz.JobBuilder.*; //導入這個類裏的靜態方法 import static org.quartz.JobBuilder.newJob; //只導入

原创 CodeForces 237C Primes on Interval

CodeForces 237C Primes on Interval Description You've decided to carry out a survey in the theory of prime numb

原创 poj 3069 Saruman's Army【貪心】

Saruman's Army Description Saruman the White must lead his army along a straight path from Isengard to Helm’s Deep.

原创 設計Student類

Java基礎入門課後習題第三單元第六題一 class Student{ private String name; private double sore; public Student(){//無參構造方法 } public

原创 Non-square Equation【公式轉換】

Non-square Equation Time Limit:1000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u DescriptionLet's co

原创 51nod 1085 揹包問題【01揹包】

1085 揹包問題 在N件物品取出若干件放在容量爲W的揹包裏,每件物品的體積爲W1,W2……Wn(Wi爲整數),與之相對應的價值爲P1,P2……Pn(Pi爲整數)。求揹包能夠容納的最大價值。 Input 第1行,

原创 Poj 3253 Fence Repair【貪心】

Fence Repair Description Farmer John wants to repair a small length of the fence around the pasture. He measures the

原创 揹包問題詳細分析

首先是01揹包(1): 【題目描述】有n個重量和價值分別是wi,vi的物品。從這些物品中挑選出總重量不超過W的物品,求所有挑選方案中價值總和的最大值。 限制條件:(PS限制條件不同,動態方程也不同) 1 <= n <= 100; 1 <

原创 Java課程設計-隨機組卷程序(僅僅包含選擇題)

摘要:        用試題文檔(.txt)隨機組卷生成試卷文檔(.doc),本次代碼實現的難點在於掃描試題文檔和調整小題在試卷文檔中的格式。前者要識別小題題目,識別小題選項。爲此需要提前對試題文檔做處理,用固定的格式進行輸入,如此才能保

原创 Number Sequence【規律】

Number Sequence Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Description A number sequ