原创 HDU4612 Warm up(割邊+樹的直徑)

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

原创 POJ3694 Network (縮點+並查集+LCA)

Network Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 10825   Accepted: 4043 Description A network

原创 HDU4635 Strongly connected(tarjan縮點+思路)

Strongly connected Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submissio

原创 Codeforces Round #460 (Div. 2) D. Substring(樹形dp)

D. Substring time limit per test 3 seconds memory limit per test 256 megabytes input standard input output sta

原创 LCA模板(tarjan+ST+倍增)

離線    tarjan:每次找最接近葉子節點的根,如果詢問的兩點在這個根上(兩點能被這個根同時訪問),則這個根爲兩點的lca #include<stdio.h> #include<iostream> #include<string.h

原创 HDU1695 GCD(容斥原理)

我校晉級第42屆ACM國際大學生程序設計競賽全球總決賽 GCD Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others

原创 codeforce 939 E. Maximize!(貪心)

E. Maximize!time limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou a

原创 Educational Codeforces Round 37 E. Connected Components?(bfs+思路)

E. Connected Components? time limit per test 2 seconds memory limit per test 256 megabytes input standard i

原创 hdu5334 XYZ and Drops(BFS)

XYZ and DropsTime Limit: 3000/1500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 21

原创 POJ2356 Find a multiple(鴿巢原理)

Find a multiple Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 8592   Accepted: 3725   Special Judge

原创 codeforce 933A Twisty Movement(dp+LIS)

A. A Twisty Movementtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outp

原创 codeforce 914-D. Bash and a Tough Math Puzzle(線段樹)

D. Bash and a Tough Math Puzzletime limit per test2.5 secondsmemory limit per test256 megabytesinputstandard inputoutpu

原创 codeforce 939D. Love Rescue(dfs+貪心)

D. Love Rescuetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVal

原创 hdu4360 As long as Binbin loves Sangsang(spfa)

Problem Description Binbin misses Sangsang so much. He wants to meet with Sangsang as soon as possible. Now Bin

原创 牛客練習賽14 E.無向圖中的最短距離 (bfs+bitset)

鏈接:https://www.nowcoder.com/acm/contest/82/E 來源:牛客網 題目描述 有一個n個點的無向圖,有m次查詢,每次查詢給出一些(xi,yi) 令dist(x,y)表示x和y點在圖中