hdu 4268】的更多相关文章

Alice和Bob有n个长方形,有长度和宽度,一个矩形可以覆盖另一个矩形的条件的是,本身长度大于等于另一个矩形,且宽度大于等于另一个矩形,矩形不可旋转,问你Alice最多能覆盖Bob的几个矩形? /* HDU 4268 贪心+STL */ #include<stdio.h> #include<math.h> #include<iostream> #include<set> #include<algorithm> using namespace s…
题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=4268 贪心思想,用set实现平衡树,但是set有唯一性,所以要用 multiset AC代码: #include <iostream> #include <cstdio> #include <cstring> #include <string> #include <cstdlib> #include <cmath> #include &…
http://acm.hdu.edu.cn/showproblem.php?pid=4268 A想用手里的牌尽量多地覆盖掉B手中的牌.. 牌有h和w 问A手中的牌最多能覆盖B多少张牌 iterator lower_bound( const key_type &key ): 返回一个迭代器,指向键值>= key的第一个元素. iterator upper_bound( const key_type &key ):返回一个迭代器,指向键值> key的第一个元素. #include…
Alice and Bob Time Limit : 10000/5000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 5   Accepted Submission(s) : 1 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description Alice and Bob's game nev…
Alice and Bob Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3716 Accepted Submission(s): 1179 Problem Description Alice and Bob's game never ends. Today, they introduce a new game. In this game…
set的利用: #include<cstdio> #include<set> #include<algorithm> #define maxn 100009 using namespace std; struct node { int w,h; bool operator <(const node& t)const { if(w==t.w)return h<t.h; return w<t.w; } }a[maxn],b[maxn]; multi…
Alice and Bob Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2901    Accepted Submission(s): 941 Problem Description Alice and Bob's game never ends. Today, they introduce a new game. In this…
Alice and Bob's game never ends. Today, they introduce a new game. In this game, both of them have N different rectangular cards respectively. Alice wants to use his cards to cover Bob's. The card A can cover the card B if the height of A is not smal…
B - Alice and Bob Time Limit:5000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Description Alice and Bob's game never ends. Today, they introduce a new game. In this game, both of them have N different rectangular cards respectively.…
http://acm.hust.edu.cn/vjudge/contest/123100#problem/B #include <iostream> #include <string> #include <cstring> #include <cstdlib> #include <cstdio> #include <cmath> #include <algorithm> #include <stack> #in…