原文:HDU 5002 Tree(动态树LCT)(2014 ACM/ICPC Asia Regional Anshan Online)

Problem Description You are given a tree with N nodes which are numbered by integers ..N. Each node is associated with an integer as the weight. Your task is to deal with M operations of types: .Dele ...

2014-09-18 14:55 9 772 推荐指数:

查看详情

2018-2019 ACM-ICPC, Asia Seoul Regional Contest

ProblemA Circuits Solved. 题意: 有$n$个矩形,可以放两条平行与$x$轴的线,求怎么放置两条无线长的平行于$x$轴的线,使得他们与矩形相交个数最多 如果一个矩形同时与两条线相交,只算一次。 思路: 离散化后枚举一根线,另一根线用线段维护,扫描线思想 ...

Sun Mar 03 02:16:00 CST 2019 0 1685
2020-2021 ACM-ICPC, Asia Seoul Regional Contest

C. Dessert Café: 题意: 给你一个N个节点的,树上有m个房子,问树上有几个节点是在两个房子之间的。 思路:我们发现只要是该节点的子树里包括了所有节点或者只有一个节点,那么这个结点肯定不是在两个房子之间的,至于证明我们可以画几幅图证明。代码实现的话,需要用到num[]数组记录 ...

Thu Jan 28 03:30:00 CST 2021 0 452
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM