| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
果然dp要注意相等的情况compare函数要加入相等的判断
struct Box {
int wid;
int len;
Box(int x, int y) : wid(x), len(y) {}
bool operator< (const Box &b) const {
if(wid == b.wid) return len < b.len;
else return wid < b.wid;
}
//return wid < b.wid; }
};
否则的话
4
1 2
1 4
1 3
1 5
这个case就会错
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator