求出支配树输出到father的和即可 支配树见:https://blog.csdn.net/a710128/article/details/49913553 #include<iostream> #include<cstdio> #include<vector> #include<cstring> using namespace std; const int N=300005; int n,m,h[N],cnt,se[N],id[N],rl[N],fa[N]…
Time Limit: 7000/7000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 598 Accepted Submission(s): 143 Problem Description There are N clones of Misaka Mikoto (sisters) forming the Misaka network. Some pairs of sister…
Important Sisters Time Limit: 7000/7000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 766 Accepted Submission(s): 192 Problem Description There are N clones of Misaka Mikoto (sisters) forming the Misaka networ…
HDU 5862 Counting Intersections(离散化+树状数组) 题目链接http://acm.split.hdu.edu.cn/showproblem.php?pid=5862 Description Given some segments which are paralleled to the coordinate axis. You need to count the number of their intersection. The input data guarant…
Triple Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 388 Accepted Submission(s): 148 Problem Description Given the finite multi-set A of n pairs of integers, an another finite multi-set B …
题目背景 SOURCE:NOIP2015-GDZSJNZX(难) 题目描述 学校一年一度的学生艺术节开始啦!在这次的艺术节上总共有 N 个节目,并且总共也有 N 个舞台供大家表演.其中第 i 个节目的表演时间为第 i 个单位时间,表演的舞台为 Ai ,注意可能有多个节目使用同一个舞台.作为 Tom 的忠实粉丝之一的 Alice,当然要来逛一下啦,顺便看一下能不能要到 Tom 的签名. Alice 一开始会先在 A1 看完节目1再去闲逛. Alice 可以在舞台之间随便乱走.但是假如 Alice…
Attack Time Limit: 5000/3000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others) Total Submission(s): 2523 Accepted Submission(s): 805 Problem Description Today is the 10th Annual of “September 11 attacks”, the Al Qaeda is about to attac…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2795 Billboard Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13050 Accepted Submission(s): 5651 Problem Description At the entrance to the un…
任意门:http://acm.hdu.edu.cn/showproblem.php?pid=2795 Billboard Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 28743 Accepted Submission(s): 11651 Problem Description At the entrance to the un…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1394 Minimum Inversion Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 10…