原文: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