HDOJ -- 4699】的更多相关文章

Editor Time Limit: 3000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1236    Accepted Submission(s): 391 Problem Description   Sample Input 8 I 2 I -1 I 1 Q 3 L D R Q 2   Sample Output 2 3 Hint The followin…
对顶栈算法. 此题充分说明了cin的不中以及scanf的优越性. 我TM用cin超时了!!!换成scanf就A了!!! #include <cstdio> #include <cstring> #include <iostream> , INF = 0x3f3f3f3f; inline int max(int a, int b) { return a > b ? a : b; } struct DZ { int l[N], r[N], sum[N], large[…
用两个栈模拟: Editor Time Limit: 3000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1913    Accepted Submission(s): 591 Problem Description   Sample Input 8 I 2 I -1 I 1 Q 3 L D R Q 2   Sample Output 2 3 Hint The…
Editor Time Limit: 3000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 2818 Accepted Submission(s): 825 Problem Description Sample Input 8 I 2 I -1 I 1 Q 3 L D R Q 2 Sample Output 2 3 Hint The following diagram…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 56784    Accepted Submission(s): 19009 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats g…
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3049    Accepted Submission(s): 2364 Problem Description You are the CEO of Nasty Hacks Inc., a company that creates small pieces of…
Box of Bricks Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5994    Accepted Submission(s): 2599 Problem Description Little Bob likes playing with his box of bricks. He puts the bricks one up…
Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will count the balloons of each color…
卧槽....最近刷的cf上有最短路,本来想拿这题复习一下.... 题意就是在输出最短路的情况下,经过每个节点会增加税收,另外要字典序输出,注意a到b和b到a的权值不同 然后就是处理字典序的问题,当松弛时发现相同值的时候,判断两条路径的字典序 代码 #include "stdio.h" const int MAXN=110; const int INF=10000000; bool vis[MAXN]; int pre[MAXN]; int cost[MAXN][MAXN],lowcos…
Rectangles    HDOJ(2056) http://acm.hdu.edu.cn/showproblem.php?pid=2056 题目描述:给2条线段,分别构成2个矩形,求2个矩形相交面积. 算法:先用快速排斥判断2个矩形是否相交.若不相交,面积为0.若相交,将x坐标排序去中间2个值之差,y坐标也一样.最后将2个差相乘得到最后结果. 这题是我大一的时候做过的,当时一看觉得很水,写起来发现其实没我想的那么水.分了好几类情况没做出来.今天看了点关于判断线段相交的知识,想起了这题便拿来练…