摘要:
HDU4544 Tags:数据结构,贪心Analysis:将兔子的血量从大到小排序,将箭的杀伤力从大到小排序,对于每一个兔子血量,将比他大的杀伤力大的剑压入优先队列,优先队列自己重写,让它每次抛出的数为价钱最小。Code:#include #include #include #include using namespace std;typedef long long LL;const int maxn = 100010;struct tt { int d; int p; bool operator t.d||(d==t.d&&p, greater > q;int ma.. 阅读全文
posted @ 2013-08-08 20:30
坚固66
阅读(150)
评论(0)
推荐(0)

浙公网安备 33010602011771号