题目:House Robber You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security system connected a…
//动态规划查找两个字符串最大子串 public static string lcs(string word1, string word2) { int max = 0; int index = 0; int[,] nums = new int[word1.Length + 1,word2.Length+1]; for (int i = 0; i <= word1.L…
http://poj.org/problem?id=1163 The Triangle Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 32923 Accepted: 19514 Description 73 88 1 02 7 4 44 5 2 6 5 (Figure 1) Figure 1 shows a number triangle. Write a program that calculates the hi…