/*
按殺龍要的人數與犧牲人數之差降序排列,在遍歷一遍即可。
*/
#include
#include
#include
using namespace std;
struct ss
{
long long a;
long long b;
}Dragon[200000];
int cmp(ss x,ss y)
{
if(x.a-x.b>y.a-y.b)
return 1;
return 0;
}
int main()
{
int n;
long long ans=0;
cin>>n;
for(int i=0;i
No Time for Dragons
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
poj3040 Allowance——貪心
不如烂笔头
2020-07-08 11:54:44
poj 1852 Ants(貪心)
wdmzsly
2020-07-08 10:42:27
貪心+multiset · HDU - 4268 ·Alice and Bob
吾之奉先
2020-07-08 06:28:52
loj#2324. 「清華集訓 2017」小 Y 和二叉樹(貪心+分類討論)
bestFy
2020-07-08 05:07:31
bzoj4319: cerc2008 Suffix reconstruction
bestFy
2020-07-08 05:07:31
ARC#058F Iroha Loves Strings(貪心+字符串處理+dp預處理)
bestFy
2020-07-08 05:07:31
[回憶殺] 圖論進階(圖論初步被我喫,反正沒人看)(poj 1052)
疯王
2020-07-07 17:31:59
Educational Codeforces Round 21 D Array Division
大唐忽悠
2020-07-07 15:29:16
【bzoj 4976】寶石鑲嵌(貪心、高位前綴和)
zP1nG
2020-07-07 13:18:59
ABC.173.E - Multiplication 4
Harris-H
2020-07-07 12:04:42
codeforce 386(div2) D. Green and Black Tea
菜逼一枚
2020-07-07 11:30:46
[COCI 2009] PASIJANS
青烟绕指柔!
2020-07-07 09:20:24
Codeforces C. Johnny and Another Rating Drop (二進制 / 貪心)(Round #647 Div.2)
S atur
2020-07-07 08:11:12