随笔分类 -  Dynamic Programming

动态规划
摘要:Problem StatementA sequence of numbers is called a zig-zag sequence if the differences between successive numbers strictly alternate between positive and negative. The first difference (if one exists) may be either positive or negative. A sequence with fewer than two elements is trivially a zig-zag 阅读全文
posted @ 2013-09-05 23:08 丶Blank 阅读(854) 评论(0) 推荐(0)
摘要:POJ-Prob.1458 看算法导论3 自己用java写的,flag可以不用,课后题要求用min(m,n)+O(1)的空间完成...改天再写. 1 import java.util.Scanner; 2 3 /** 4 * Created by IntelliJ IDEA. 5 * User: mayday 6 * Date: 13-2-15 7 * Time: 下午5:03 8 */ 9 public class Main {10 public static int m, n;11 12 public static void main(String[] args... 阅读全文
posted @ 2013-02-15 18:46 丶Blank 阅读(317) 评论(1) 推荐(0)