hdu 3177 Crixalis's Equipment】的更多相关文章

主题链接:http://acm.hdu.edu.cn/showproblem.php? pid=3177 Problem Description Crixalis - Sand King used to be a giant scorpion(蝎子) in the deserts of Kalimdor. Though he's a guardian of Lich King now, he keeps the living habit of a scorpion like living und…
Crixalis's Equipment Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2562    Accepted Submission(s): 1056 Problem Description Crixalis - Sand King used to be a giant scorpion(蝎子) in the deserts…
http://acm.hdu.edu.cn/showproblem.php? pid=3177 Crixalis's Equipment Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2562    Accepted Submission(s): 1056 Problem Description Crixalis - Sand Kin…
Crixalis's Equipment Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1854    Accepted Submission(s): 770 Problem Description Crixalis - Sand King used to be a giant scorpion(蝎子) in the deserts o…
Crixalis's Equipment Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2795    Accepted Submission(s): 1141 Problem Description Crixalis - Sand King used to be a giant scorpion(蝎子) in the deserts…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3177 \(describe\): 有一个山洞,山洞的容积最大为\(v\).现在你有\(n\)个物品,这些物品在往山洞里搬和放在山洞所需要占用山洞的体积是两个不同的值\(B\),\(A\).你可以理解为在搬运这个物品进洞时需要的容积为一个\(B\),放下物品后的容积是一个\(A\).在任何时刻搬运物品都不允许超过山洞的最大容积.试求能不能把所有物品搬进去 题解: 这个题正解是贪心...没错... 题目…
题意:判断 n 件物品是否可以搬进洞里,每件物品有实际体积A和移动时的额外体积 B . 析:第一反应就是贪心,一想是不是按B从大到小,然后一想,不对,比如体积是20,第一个 是A=11, B=19.第二个是A = 1,B = 18.很明显不对. 我们取AB的差值,进行贪心,为什么呢? 我反过来想一下,假设我们把两个物品搬到洞中,所需要的洞的最小体积.第一个,A = 2,B = 10. 第二个,A = 5, B = 10.如果先放第一个,第放第二个,体积为12,如果反过来则是15,很明显是先放 差…
Crixalis's Equipment Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2001    Accepted Submission(s): 805 [解题思路]这题只能说盛爷威武!盛爷给我们将贪心的时候将这题拿出来了,主要说说这题的思路,拿出两个装备,ai, bi, aj, bj, 假设两件装备都能放进去,那么先放置i后放置…
pid=3966" target="_blank" style="">题目链接:hdu 3966 Aragorn's Story 题目大意:给定一个棵树,然后三种操作 Q x:查询节点x的值 I x y w:节点x到y这条路径上全部节点的值添加w D x y w:节点x到y这条路径上全部节点的值降低w 解题思路:树链剖分,用树状数组维护每一个节点的值. #pragma comment(linker, "/STACK:1024000000,1…
HDU Aragorn's Story 题目链接 树抛入门裸题,这题是区间改动单点查询,于是套树状数组就OK了 代码: #include <cstdio> #include <cstring> #include <vector> #include <algorithm> using namespace std; const int N = 50005; inline int lowbit(int x) {return x&(-x);} int dep…