Tempter of the BoneTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 52416 Accepted Submission(s): 14094Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a
King Arthur's KnightsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1518 Accepted Submission(s): 645Special JudgeProblem DescriptionI am the bone of my sword. Steel is my body, and the fire is my
Blue JeansTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9973 Accepted: 4210DescriptionThe Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands of
All in AllTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 25558 Accepted: 10280DescriptionYou have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way.
Flip GameTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 25323 Accepted: 10927DescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other
Prime Ring ProblemTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 20105 Accepted Submission(s): 9001Problem DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1
地址:https://vijos.org/p/1014題意:旅行商問題,不過要求只能單向走,就是有n個地方,要求從西往東,到最東面的地方,在從東往西返回,經過每個點一次,求最短路徑分析:由於有了方向的限制,這題不再是NP難題,我們可以假設有兩個人一起從西往東走,走過的點不能重複,這樣就有f[ i ][ j ]表示第一個人走到i,第二個人走到j 的最短路徑,要求i<j,且0到j的點都被經過了,這樣很容易想到,j+1的點不是被第一個人走,就是被第二個人走,所以有轉移方程f[ i ][ j+1]
對圖分別建立入邊表和出邊表,分別求出x到個點的最短路,然後相加求出最大值。Silver Cow PartyTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 8756 Accepted: 3911DescriptionOne cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party
USACO ORZTime Limit: 5000/1500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2291 Accepted Submission(s): 822Problem DescriptionLike everyone, cows enjoy variety. Their current fancy is new shapes for pastures.
題目:https://vijos.org/p/1069題意:給你一個凸包,問遍曆所有點一遍的最短路徑分析:由於圖形是一個凸包,所以肯定是選一個點,然後從兩端不斷拓展出去,假設已經拓展[i , i+len ]這幾個點,且f[ i ][ len ][0]為遍曆這些點,且終點為i的最短路,f[ i ] [len] [1]為遍曆這些點,且終點為i+len的最短路,那麼有 f[i][len][0]=min(f[(i+1)%n][len-1][0]+d[i][(i+1)%n],