随笔分类 -  图论

摘要:D. Substring 题意: 给你一个有向图,然后给你一串字符串第i个点的值为第i个字符,然后给你m条有向边,从中找一条路径然后这条路径中点的值相同的个数的最大值,如果图有环输出 1。 思路: 拓扑排序+dp 我们需要找到一条路径的开头,用拓扑排序即可,然后每个点维护26个字母在到当前点的路径上 阅读全文
posted @ 2018-02-01 19:39 sCjTyC 阅读(295) 评论(0) 推荐(0)
摘要:A Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 to N . No 阅读全文
posted @ 2016-12-18 13:01 sCjTyC 阅读(323) 评论(0) 推荐(0)
摘要:Exploration Accepts: 190 Submissions: 976 Time Limit: 30000/15000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Exploration Accepts: 19 阅读全文
posted @ 2016-12-11 16:04 sCjTyC 阅读(357) 评论(0) 推荐(0)
摘要:The Best Path Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 207 Accepted Submission(s): 91 Prob 阅读全文
posted @ 2016-09-17 21:02 sCjTyC 阅读(288) 评论(0) 推荐(0)
摘要:1808: 地铁 Description Bobo 居住在大城市 ICPCCamp。 ICPCCamp 有 n 个地铁站,用 1,2,…,n 编号。 m 段双向的地铁线路连接 n 个地铁站,其中第 i 段地铁属于 ci 号线,位于站 ai,bi 之间,往返均需要花费 ti 分钟(即从 ai 到 bi 阅读全文
posted @ 2016-09-15 16:10 sCjTyC 阅读(299) 评论(0) 推荐(0)
摘要:1281 - New Traffic System PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB The country - Ajobdesh has a lot of problems in t 阅读全文
posted @ 2016-07-29 19:43 sCjTyC 阅读(266) 评论(0) 推荐(0)
摘要:1108 - Instant View of Big Bang PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Have you forgotten about wormholes? Oh my g 阅读全文
posted @ 2016-05-19 13:19 sCjTyC 阅读(289) 评论(0) 推荐(0)
摘要:Problem 2233 ~APTX4869 Accept: 55 Submit: 176Time Limit: 1000 mSec Memory Limit : 32768 KB Accept: 55 Submit: 176Time Limit: 1000 mSec Memory Limit : 阅读全文
posted @ 2016-05-12 11:06 sCjTyC 阅读(273) 评论(0) 推荐(0)
摘要:1009 - Back to Underworld PDF (English) Statistics Forum Time Limit: 4 second(s) Memory Limit: 32 MB The Vampires and Lykans are fighting each other t 阅读全文
posted @ 2016-03-23 13:31 sCjTyC 阅读(326) 评论(0) 推荐(0)
摘要:Description Mr.Dog was fired by his company. In order to support his family, he must find a new job as soon as possible. Nowadays, It's hard to have a 阅读全文
posted @ 2016-03-22 21:43 sCjTyC 阅读(347) 评论(0) 推荐(0)
摘要:Description Windy has N balls of distinct weights from 1 unit to N units. Now he tries to label them with 1 to N in such a way that: Can you help wind 阅读全文
posted @ 2016-03-21 21:27 sCjTyC 阅读(199) 评论(0) 推荐(0)
摘要:Description Input Output Sample Input Sample Output 阅读全文
posted @ 2016-03-21 10:05 sCjTyC 阅读(239) 评论(0) 推荐(0)
摘要:Rikka with Graph Accepts: 123 Submissions: 525 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) 问题描述 众所周知,萌萌哒六花不擅长数学,所 阅读全文
posted @ 2016-02-24 14:42 sCjTyC 阅读(399) 评论(0) 推荐(0)
摘要:详细讲解:http://blog.csdn.net/smartxxyx/article/details/9293665 下面贴上我的第一道最大流的题: hdu3549 DINIC算法 阅读全文
posted @ 2016-02-19 22:48 sCjTyC 阅读(368) 评论(0) 推荐(0)
摘要:A1. 道路修建 SmallTime Limit: 1000msMemory Limit: 131072KB64-bit integer IO format: %lld Java class name: MainSubmit Status无向图初始有个点,从到依次标号,但是没有边,接下来有次操作,从 阅读全文
posted @ 2016-02-03 22:13 sCjTyC 阅读(509) 评论(0) 推荐(0)
摘要:题意:给你N个点表示N个站,有汽车和火车,汽车只能走公路,火车只能走铁路。然后给你M条双向路,代表这两个点之间有铁路连接。然后告诉你如果两个点之间没有铁路,那么就是公路连接。问你汽车和火车都到达目的地所要的最小时间是多少(两种交通工具不能同时到达同一个城市除了目的地)。如果有一种交通工具不能到达就输... 阅读全文
posted @ 2015-11-30 11:33 sCjTyC 阅读(399) 评论(0) 推荐(0)