=======树/图论=======
文章平均质量分 87
VampireWeekend
I want my dreams to rescue me
展开
-
ACM-ICPC 2018 沈阳赛区网络预赛 J. Ka Chang dfs序+大小分治
Problem J. Ka ChangInput file: standard input Output file: standard output Time limit: 1 seconds Memory limit: 128 mebibytesProblem DescriptionGiven a rooted tree ( the root is node 1 ) of nn...原创 2018-09-12 23:31:40 · 256 阅读 · 0 评论 -
Codeforces 700C Break Up tarjan求桥
C. Break Uptime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAgain, there are hard times in Berland! Many to原创 2017-11-03 22:03:46 · 388 阅读 · 0 评论 -
Codeforces 889B (Codeforces Round #445 Div. 1) Restoration of string 图论
B. Restoration of stringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA substring of some string is call原创 2017-11-13 13:31:11 · 794 阅读 · 0 评论 -
Codeforces 666B World Tour 暴力最短路
B. World Tourtime limit per test5 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputA famous sculptor Cicasso goes to a world tou原创 2017-11-12 22:57:32 · 376 阅读 · 0 评论 -
Hdu 6007 Mr. Panda and Crystal 最短路+完全背包
Mr. Panda and CrystalTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 605 Accepted Submission(s): 202Problem DescriptionLong l原创 2017-11-07 17:37:07 · 400 阅读 · 0 评论 -
Codeforces 189D AlgoRace floyd+DP
D. AlgoRacetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPMP is getting a warrior. He is practicing a lo原创 2017-10-12 19:09:28 · 318 阅读 · 0 评论 -
Codeforces 858F ( Codeforces Round #434 Div. 2 F ) Wizard's Tour 图论dfs
D. Wizard's Tourtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAll Berland residents are waiting for an u原创 2017-10-06 15:21:22 · 494 阅读 · 1 评论 -
POJ 3621 Sightseeing Cows 最优比率环
Sightseeing CowsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10569 Accepted: 3623DescriptionFarmer John has decided to reward his cows for their ha原创 2017-10-04 18:32:13 · 391 阅读 · 0 评论 -
POJ 2728 Desert King 最优比率生成树
Desert KingTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 26962 Accepted: 7483DescriptionDavid the Great has just become the king of a desert country原创 2017-10-04 14:28:09 · 228 阅读 · 0 评论 -
Codeforces Round 864F (Codeforces Round #436 Div. 2) F. Cities Excursions tarjan判环
F. Cities Excursionstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n cities in Berland. Some pa原创 2017-09-30 21:39:43 · 418 阅读 · 0 评论 -
Hdu 6073 Matching In Multiplication 二分图完美匹配
Matching In MultiplicationTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 1855 Accepted Submission(s): 563Problem Description原创 2017-09-30 12:13:01 · 292 阅读 · 0 评论 -
Hdu 6081 度度熊的王国战略 无向图全局最小割
度度熊的王国战略Time Limit: 40000/20000 MS (Java/Others) Memory Limit: 32768/132768 K (Java/Others)Total Submission(s): 568 Accepted Submission(s): 239Problem Description度度熊国王率领着喵哈哈族的勇士,原创 2017-09-02 22:31:19 · 367 阅读 · 0 评论 -
Codeforces Round #410 (Div. 2) A B C D E
A. Mike and palindrometime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMike has a string s consisting of on原创 2017-09-01 19:21:28 · 344 阅读 · 0 评论 -
Hdu 6201 transaction transaction transaction 树型DP
transaction transaction transactionTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others)Total Submission(s): 118 Accepted Submission(s): 52Problem Descri原创 2017-09-10 21:39:30 · 226 阅读 · 0 评论 -
Codeforces Gym - 101102K Topological Sort 线段树+拓扑序
K. Topological Sort time limit per test8.0 smemory limit per test256 MBinputstandard inputoutputstandard outputConsider a directed graph G of N nodes and all edges (u→v) such th...原创 2018-07-20 11:50:02 · 394 阅读 · 0 评论 -
Codeforces 429E Points and Segments 欧拉回路
E. Points and Segmentstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIahub isn't well prepared on geometry原创 2017-11-05 21:12:48 · 334 阅读 · 0 评论 -
Hdu 6005 Pandaland 无向图最小环:最短路剪枝
PandalandTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 897 Accepted Submission(s): 210Problem DescriptionMr. Panda lives in原创 2017-11-05 23:09:21 · 490 阅读 · 0 评论 -
Codeforces Gym 101630C Connections 强连通分量Tarjan
Problem C. ConnectionsInput file: standard input Output file: standard output Time limit: 3 seconds Memory limit: 512 mebibytesHard times are coming to Byteland. Quantum computing is becoming m...原创 2018-07-31 19:04:20 · 368 阅读 · 0 评论 -
Codeforces Gym 101630L Laminar Family 树链剖分
Problem L. Laminar FamilyInput file: standard input Output file: standard output Time limit: 3 seconds Memory limit: 512 mebibytesWhile studying combinatorial optimization, Lucas came across th...原创 2018-07-31 18:49:18 · 396 阅读 · 0 评论 -
XVIII Open Cup named after E.V. Pankratiev. Grand Prix of Saratov - L. Increasing Costs
Problem L. Increasing CostsInput file: standard input Output file: standard output Time limit: 4 seconds Memory limit: 256 mebibytesBerland consists of n cities labeled from 1 to n. The city nu...原创 2018-07-22 19:05:41 · 401 阅读 · 0 评论 -
Petrozavodsk Winter-2018. Carnegie Mellon U Contest. A. Mines 线段树建图+强连通分量
Problem A. MinesInput file: standard inputOutput file: standard outputTime limit: 10 seconds There are N mines on the number line. Mine i is at position pi and has an explosion radius ri....原创 2018-07-20 16:04:42 · 437 阅读 · 0 评论 -
Codeforces 960E Alternating Tree 树型DP
E. Alternating Treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGiven a tree with nn nodes numbered from 11 to nn. Each node ii has an associat...原创 2018-04-09 21:43:18 · 501 阅读 · 0 评论 -
Codeforces 950E / 949C Data Center Maintenance 图论+tarjan
C. Data Center Maintenancetime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputBigData Inc. is a corporation that has n data centers indexed from 1 to n...原创 2018-03-11 19:32:47 · 1129 阅读 · 0 评论 -
POJ 3678 Katu Puzzle 2-SAT
Katu PuzzleTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10965 Accepted: 4063DescriptionKatu Puzzle is presented as a directed graph G(V, E) with each edge e(a, b) labeled by a boolean ope...原创 2018-03-10 15:43:59 · 193 阅读 · 0 评论 -
POJ 1741 Tree 树分治
TreeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 27073 Accepted: 9003DescriptionGive a tree with n vertices,each edge has a length(positive integer less than 1001). Define dist(u,v)=The m...原创 2018-03-15 20:00:35 · 147 阅读 · 0 评论 -
Codeforces 932D Tree 树上倍增
D. Treetime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputYou are given a node of the tree with index 1 and with weight 0. Let cnt be the number of n...原创 2018-03-08 15:36:09 · 236 阅读 · 0 评论 -
Codeforces 914E Palindromes in a Tree 点分治
E. Palindromes in a Treetime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a tree (a connected acyclic undirected graph) of n vertices....原创 2018-03-14 19:52:13 · 958 阅读 · 0 评论 -
Hdu 4807 Lunch Time 费用流
Lunch TimeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 735 Accepted Submission(s): 162Problem DescriptionThe campus of Nan原创 2018-01-25 23:42:12 · 231 阅读 · 0 评论 -
Hdu 6126 Give out candies 最小割
Give out candiesTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 517 Accepted Submission(s): 170Problem DescriptionThere are原创 2018-01-24 22:51:52 · 376 阅读 · 0 评论 -
Codeforces Gym 101173B / BZOJ 4788 Bipartite Blanket 二分图Hall定理+状态压缩DP
Problem B: Bipartite BlanketTime limit: 3 sMemory limit: 512 MiBIn a bipartite graph, nodes are partitioned into two disjoint sets A and B such that every edge connects anode from A with a node原创 2018-01-22 21:34:23 · 576 阅读 · 0 评论 -
Codeforces Round #383 (Div. 1)
A. Arpa's loud Owf and Mehrdad's evil plantime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs you have notic原创 2017-11-26 17:04:15 · 279 阅读 · 0 评论 -
Codeforces Gym 100814 G It is all about wisdom 二分+最短路
G. It is all about wisdomtime limit per test11.0 smemory limit per test1024 MBinputstandard inputoutputstandard outputFoki is the president of the Martian Unite原创 2017-07-28 12:33:48 · 1613 阅读 · 0 评论 -
Codeforces Round #430 (Div. 2) A B C D
A. Kirill And The Gametime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputKirill plays a new computer game. He原创 2017-08-31 21:38:19 · 410 阅读 · 0 评论 -
Hdu 5405 Sometimes Naive 树链剖分+线段树
树#include #include #include #include #include #include #include #include #include #include #include #include #define mem0(a) memset(a,0,sizeof(a))#define meminf(a) memset(a,0x3f,si原创 2017-09-22 16:28:46 · 337 阅读 · 0 评论 -
Codeforces 219D Choosing Capital for Treeland 树型DP
D. Choosing Capital for Treelandtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe country Treeland consi原创 2017-07-23 10:53:24 · 252 阅读 · 0 评论 -
Hdu 2568 How far away? LCA
How far away ?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16755 Accepted Submission(s): 6397Problem DescriptionThere are原创 2017-07-28 16:48:39 · 194 阅读 · 0 评论 -
Codeforces Round #425 (Div. 2) D. Misha, Grisha and Underground LCA
D. Misha, Grisha and Undergroundtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMisha and Grisha are funny原创 2017-07-28 20:24:21 · 411 阅读 · 2 评论 -
Codeforces 827D (Round #423 Div. 1) D. Best Edge Weight 树上倍增
D. Best Edge Weighttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a connected wei原创 2017-08-18 20:45:48 · 660 阅读 · 0 评论 -
HDU 5889 Barricade 最小割
BarricadeTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1699 Accepted Submission(s): 501Problem DescriptionThe empire is und原创 2017-08-11 20:57:07 · 214 阅读 · 0 评论 -
Codeforces Round #408 Div.2 A B C D
A. Buying A Housetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputZane the wizard had never loved anyone be原创 2017-08-10 20:04:27 · 368 阅读 · 0 评论