原创 Smallest Difference(剪枝)

Given a number of distinct decimal digits, you can form one integer by choosing a non-empty subset of these digits and

原创 AGTC

Let x and y be two strings over some finite alphabet A. We would like to transformx into y allowing only operations gi

原创 排列2(next_permutation(a,a+n))

題目鏈接:https://vjudge.net/contest/177033#problem/H 題意:對每組卡片按從小到大的順序輸出所有能由這四張卡片組成的4位數,千位數字相同的在同一行,同一行中每個四位數間用空格分隔 題解:從oupu

原创 B卷編程題參考答案(軟2)

求1*1+2*2+3*3+4*4+...n*n import java.util.Scanner; public class Test1 { public static void main(String[] args) { S

原创 Bone Collector(01揹包)

Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies o

原创 Piggy-Bank(完全揹包)

Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for

原创 數塔問題

在講述DP算法的時候,一個經典的例子就是數塔問題,它是這樣描述的: 有如下所示的數塔,要求從頂層走到底層,若每一步只能走到相鄰的結點,則經過的結點的數字之和最大是多少? 已經告訴你了,這是個DP的題目,你能AC嗎? Input 輸入

原创 Red and Black

        There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is stan

原创 石子合併問題--直線版(矩陣相乘)

一條直線上擺放着一行共n堆的石子。現要將石子有序地合併成一堆。規定每次只能選相鄰的兩堆合併成新的一堆,並將新的一堆石子數記爲該次合併的得分。請編輯計算出將n堆石子合併成一堆的最小得分和將n堆石子合併成一堆的最大得分。Input 輸入有多

原创 Common Subsequence

A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X

原创 Coins(多重揹包)

Whuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. One day Hibix opened purse and found ther

原创 Super Jumping! Jumping! Jumping!

Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good b

原创 SpringBoot項目學習路徑+細節

1.Spring Data JPA項目實戰 https://blog.csdn.net/chengqiuming/article/details/82556658 2.CacheManager運行原理流程圖和源碼詳解 https://bl

原创 X的平方根

設計函數int sqrt(int x),計算 xxx 的平方根。 輸入格式 輸入一個 整數 xxx,輸出它的平方根。直到碰到文件結束符(EOF)爲止。 輸出格式 對於每組輸入,輸出一行一個整數,表示輸入整數的平方根。 樣例輸入 1 2

原创 兩組有序數列的中位數

兩組升序排列的數組A[m]和B[n], 求他們的中位數。 注意,中位數的概念哦~相信你會百度一下的~   格式: 第一行輸入數字m,接下來一行輸入數組A[m], 第三行輸入數字n,第四行輸入數組B[n],接下來輸出中位數。兩個數組的長度都