题目I - Osu! - HDU 5078 题目分析:最水的一道题吧,求两点间的距离和时间差值的最大比值 #include<stdio.h> #include<math.h> #include<algorithm> using namespace std; ; ; struct Point { double x, y, time; }; double Dist(Point a, Point b) { return sqrt((a.x-b.x)*(a.x-b.x)+(a.…
Clone Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/65536K (Java/Other) Total Submission(s) : 8   Accepted Submission(s) : 5 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description After eating food from Chernobyl,…
Mart Master II Time Limit: 12000/6000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 675    Accepted Submission(s): 237 Problem Description Trader Dogy lives in city S, which consists of n districts. There are n - 1…
ACM ICPC Central Europe Regional Contest 2013 Jagiellonian University Kraków Problem A: Rubik’s RectangleProblem B: What does the fox say?Problem C: Magical GCDProblem D: SubwayProblem E: EscapeProblem F: DraughtsProblem G: History courseProblem H: C…
2019-2020 ICPC, Asia Jakarta Regional Contest (Online Mirror, ICPC Rules, Teams Preferred) easy: ACEGHK medium-easy: BJL medium: D ?????: I A. B. C. 对 \(R[],C[]\) 分别按奇偶性分段. 网! D. 考虑 check 一个串,枚举右走对应的前缀 pre,下走对应的后缀 suf. 把每行反串拼接中间连特殊字符,建 SA,能 match 上 p…
默默的签到 Osu! http://acm.hdu.edu.cn/showproblem.php?pid=5003 #include<cstdio> #include<algorithm> using namespace std; ]; int main(){ int t,n; while(~scanf("%d",&t)){ while(t--){ scanf("%d",&n); ;i<n;i++){ scanf(&qu…
Problem Description You are given a tree with N nodes which are numbered by integers 1..N. Each node is associated with an integer as the weight. Your task is to deal with M operations of 4 types: 1.Delete an edge (x, y) from the tree, and then add a…
Problem Description After eating food from Chernobyl, DRD got a super power: he could clone himself right now! He used this power for several times. He found out that this power was not as perfect as he wanted. For example, some of the cloned objects…
Tree http://acm.hdu.edu.cn/showproblem.php?pid=5044 树链剖分,区间更新的时候要用on的左++右--的标记方法,要手动扩栈,用c++交,综合以上的条件可过. #include<cstdio> #include<cstring> #include<algorithm> #pragma comment(linker, "/STACK:36777216") #define mt(a,b) memset(a,…
Galaxy Problem's Link:   http://acm.hdu.edu.cn/showproblem.php?pid=5073 Mean: 在一条数轴上,有n颗卫星,现在你可以改变k颗卫星的位置,使得剩下的n-k颗卫星到某个点(不固定)的距离的平方和最小. 抽象成数学语言后等价于:数轴上有n个点,现在去掉k个点,使得剩下的n-k个点的方差最小,求方差*n的值. analyse: 一道让人很容易想偏的数学题.首先说一下我的思路: 1)我们最终的目的是让这n-k个点尽量的集中,所以去…