矩形嵌套问题
摘要:        
这个问题据说是dp问题,不过我觉得只用到了一点dp知识,先把矩形排序,宽对应宽长对应长;然后对宽或者长进行排序(二级排序),再找出另一方的最大上升子序列,即可。#include<stdio.h>#include<stdlib.h>#include<string.h>#include<math.h># define maxn 1000int cmp(const void *a,const void *b){ int* c = (int *)a; int* d = (int *)b; if(*c != *d) return *c - *d; retu    阅读全文
        
            posted @ 2011-08-17 15:47
java课程设计例子
阅读(264)
评论(0)
推荐(0)
        
     
                    
                 浙公网安备 33010602011771号
浙公网安备 33010602011771号