摘要:
1)正难则反,考虑把空隙弄到最大,即找出前M-1个最大的空隙2)数据输入时,虽然M最大为20,但保留空隙的数组要开大(针对sort而言)3)有可能M>C,这时,要取C-1作为空隙选取的个数上界/* ID:linyvxi1 PROB:barn1 LANG:C++*/#include <stdio.h>#include <algorithm>#include <stdlib.h>using namespace std;int min(int a,int b){ return a<b?a:b;}bool cmp(int a,int b){ return 阅读全文
posted @ 2011-10-30 20:12
linyvxiang
阅读(186)
评论(0)
推荐(0)

浙公网安备 33010602011771号