原创 #HDU 4612 Warm up (tarjan + 樹的直徑)

Warm up Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 10317

原创 #2019-2020 ICPC, Asia Jakarta Regional Contest G題(線段樹)

G. Performance Review time limit per test 2 seconds memory limit per test 256 megabytes input standard input output sta

原创 #牛客網 監視任務(貪心 + 線段樹)

  題目描述 𝑅𝑒𝑘𝑖在課餘會接受一些民間的鷹眼類委託,即遠距離的狙擊監視防衛。 𝑅𝑒𝑘𝑖一共接到了𝑚份委託,這些委託與𝑛個直線排布的監視點相關。 第𝑖份委託的內容爲:對於區間[𝑙𝑖, 𝑟𝑖]中的監視點,至少要防衛其中的𝑘𝑖個。 𝑅𝑒𝑘𝑖

原创 #HDU 6315 2018多校練習賽第二場 Naive Operations (線段樹 + 算貢獻)

Naive Operations Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 502768/502768 K (Java/Others) Total Submission

原创 #codeforces div2 597 D.Shichikuji and Power Grid (建立源點 + MST)

D. Shichikuji and Power Grid time limit per test 2 seconds memory limit per test 256 megabytes input standard input out

原创 #牛客網 小雨坐地鐵 - 2 (分層圖最短路)

  題目描述 小雨所在的城市一共有 mmm 條地鐵線,分別標號爲 1 號線,2 號線,……,m 號線。整個城市一共有 nnn 個車站,編號爲 1∼n1 \sim n1∼n 。其中坐 i 號線需要花費 aia_iai​ 的價格,每坐一站就需

原创 #2018-2019 ACM-ICPC, NEERC, Southern Subregional Contest, Qualification Stage (快樂場)

A. Coffee Break time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard

原创 #ICPC 2019-2020 North-Western Russia Regional Contest E (拓撲排序)

E. Equidistant time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard o

原创 #2019-2020 ICPC, NERC, Southern and Volga Russian Regional Contest 部分題解

A. Berstagram time limit per test 3 seconds memory limit per test 512 megabytes input standard input output standard ou

原创 Codeforces Round #600 (Div. 2) D (貪心)

D. Harmonious Graph time limit per test 1 second memory limit per test 256 megabytes input standard input output standa

原创 #Codeforces Round #603 (Div. 2) E (線段樹)

E. Editor time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output

原创 #Codeforces Round #425 (Div. 2) D LCA + 樹上路徑交

D. Misha, Grisha and Underground time limit per test 2 seconds memory limit per test 256 megabytes input standard input

原创 #2018 German Collegiate Programming Contest (GCPC 18) A (建圖 + LCA)

    題目大意 : 有一個由 "_", “|”, “ ”構成的圖,任意兩個格子之間的路徑是唯一的, 現在有Q個點, 編號分別爲1 到 Q, 輸出從1 - > 2 + 2 - > 3…… 到 Q的路徑之和, 不可以跳過 思路 : 建圖見

原创 Codeforces Round #221 (Div. 1) D Tree and Queries(樹上啓發式合併 + 樹狀數組)

D. Tree and Queries time limit per test 1 second memory limit per test 256 megabytes input standard input output standa

原创 Codeforces Round #625 (Div. 2) A ~ D

                                                                       A. Contest for Robots time limit per test 1 seco