摘要: StampsGiven a set of N stamp values (e.g., {1 cent, 3 cents}) and an upper limit K to the number of stamps that can fit on an envelope, calculate the largest unbroken list of postages from 1 cent to M cents that can be created.For example, consider stamps whose values are limited to 1 cent and 3 cen 阅读全文
posted @ 2012-10-20 15:37 剑不飞 阅读(259) 评论(0) 推荐(0) 编辑
摘要: Shaping RegionsN opaque rectangles (1 #include using namespace std; ifstream cin("rect1.in"); ofstream cout("rect1.out"); const int mm=2600; class point { public: int l,r,u,d; int colour,area; point(){area=0;colour=0;} }pos[1200]; int ans[mm]; int cas; int ce; void kill(int l,int 阅读全文
posted @ 2012-10-20 13:34 剑不飞 阅读(220) 评论(0) 推荐(0) 编辑