摘要: You are given an undirected graph with weighted edges. The length of some path between two vertices is the bitwise xor of weights of all edges belongi 阅读全文
posted @ 2018-07-09 01:59 StarHai 阅读(258) 评论(0) 推荐(0) 编辑
摘要: You are given an undirected graph with weighted edges. The length of some path between two vertices is the bitwise xor of weights of a... 阅读全文
posted @ 2018-07-09 01:59 StarHai 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 弗吉桑Time Limit: 3000 MS Memory Limit: 64 MBSubmit Status弗吉桑是一座横跨清水河大草原的活火山,位于子科技大学主楼东北方约 80km 处,主峰海拔 3776m , 2002 年 8 月经电子科大校土局重新测量... 阅读全文
posted @ 2018-07-09 01:53 StarHai 阅读(245) 评论(0) 推荐(0) 编辑
摘要: M - 图书馆Time Limit: 2000 MS Memory Limit: 256 MBSubmit Status电子科技太学图书馆创建于1956年,馆舍总面积66974平方米,各类阅览室37个,阅览座位10023个(含在建新馆),馆藏总量371.8万册... 阅读全文
posted @ 2018-07-08 00:01 StarHai 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 查找第k大Submit Page Summary Time Limit: 1 Sec Memory Limit: 128 Mb Submitted: 316 Solved: 20 Description小W有很强的好胜心,也有... 阅读全文
posted @ 2018-07-07 22:46 StarHai 阅读(409) 评论(0) 推荐(0) 编辑
摘要: Barareh on Fire Submit Page Summary Time Limit: 3 Sec Memory Limit: 512 Mb Submitted: 102 Solved: 48 Description The Barareh village is on fire due to 阅读全文
posted @ 2018-07-07 22:42 StarHai 阅读(318) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 16142 Accepted: 7305 Description A Telephone Line Company (TLC) is establishing a new telep 阅读全文
posted @ 2018-07-07 22:24 StarHai 阅读(261) 评论(0) 推荐(0) 编辑
摘要: By Recognizing These Guys, We Find Social Networks Useful Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 125536/65536 K (Java/Others)Total Submi 阅读全文
posted @ 2018-07-07 22:21 StarHai 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 割顶和桥:对于无向图G,如果删除某个节点u后,连通分量数目增加,则称u为图的割顶;如果删除某条边后,连通分量数目增加,则称该边为图的桥。对于连通图删除割顶或桥后都会使得图不再连通 以下我,我们利用dfs的性质来快速找出一个连通图中的所有的割顶和桥 首先我们要引入”时间戳”这个概念: 时间戳:表示在进 阅读全文
posted @ 2018-07-07 21:54 StarHai 阅读(835) 评论(0) 推荐(0) 编辑
摘要: 励志的猴子Time Limit: 1000 MS Memory Limit: 256 MBSubmit Status上图是2013南京亚青会吉祥物圆圆。自从它诞生以来,它就被吐槽为最丑吉祥物。即使如此,它仍然坚强的活着,并且……它还学会了人类的坐标系、画画和数... 阅读全文
posted @ 2018-07-07 15:07 StarHai 阅读(417) 评论(0) 推荐(0) 编辑
摘要: 北极的猴子 Time Limit: 1000 MS Memory Limit: 256 MB Submit Status 也许你不知道,在北极也有猴子,我们叫它们北极猴。北极猴们在北极一共有n个聚落,不妨叫它们1,2,…n号聚落;它们之间有m条双向道路(这意味着如果一条路从1号聚落到2号聚落,那么你 阅读全文
posted @ 2018-07-07 00:32 StarHai 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 天才钱vs学霸周2Time Limit: 500 MS Memory Limit: 128 MBSubmit Status由于上次的游戏中学霸周输了,因此学霸周想出个问题为难天才钱,问题是这样的,有一个n×mn×m的矩阵,每一个格子中有一个整数,周大爷给出了数... 阅读全文
posted @ 2018-07-07 00:15 StarHai 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 天才钱vs学霸周Time Limit: 1000 MS Memory Limit: 256 MBSubmit Status有一天,天才钱和学霸周闲的无聊玩起了游戏,游戏内容是这样的,现在有nn个城堡 mm个不同的桥,每一个桥连接着两个不同的城堡,并且已知这mm... 阅读全文
posted @ 2018-07-07 00:05 StarHai 阅读(436) 评论(0) 推荐(0) 编辑
摘要: 学霸周选课Time Limit: 1000 MS Memory Limit: 128 MBSubmit Status众所周知周大爷不仅编程了得,专业课成绩更是名列前茅,恰巧又到了选课的季节,神秘的zin作为周大爷的好朋(基)友,给了周大爷一份课表,这个课 表和... 阅读全文
posted @ 2018-07-06 23:55 StarHai 阅读(318) 评论(0) 推荐(0) 编辑
摘要: B. Light It Uptime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently, you bough... 阅读全文
posted @ 2018-06-28 22:59 StarHai 阅读(373) 评论(0) 推荐(0) 编辑
摘要: A. Codehorses T-shirtstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputCodehorses... 阅读全文
posted @ 2018-06-28 22:57 StarHai 阅读(3248) 评论(0) 推荐(0) 编辑
摘要: F. Cards and Joytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are nn pla... 阅读全文
posted @ 2018-06-28 19:22 StarHai 阅读(323) 评论(0) 推荐(0) 编辑
摘要: E. Reachability from the Capitaltime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output... 阅读全文
posted @ 2018-06-28 19:16 StarHai 阅读(377) 评论(0) 推荐(0) 编辑
摘要: D. Equalize the Remainderstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou ar... 阅读全文
posted @ 2018-06-28 19:07 StarHai 阅读(405) 评论(0) 推荐(0) 编辑
摘要: C. Alphabetic Removalstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are gi... 阅读全文
posted @ 2018-06-28 19:00 StarHai 阅读(273) 评论(0) 推荐(0) 编辑
摘要: time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA string ss of length nn can be e... 阅读全文
posted @ 2018-06-28 18:57 StarHai 阅读(310) 评论(0) 推荐(0) 编辑
摘要: A. Mishka and Contesttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMishka start... 阅读全文
posted @ 2018-06-28 18:55 StarHai 阅读(309) 评论(0) 推荐(0) 编辑
摘要: Mishka started participating in a programming contest. There are nn problems in the contest. Mishka's problem-solving skill is equal t... 阅读全文
posted @ 2018-06-27 16:11 StarHai 阅读(428) 评论(0) 推荐(0) 编辑
摘要: Corn FieldsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 16473 Accepted: 8678DescriptionFarmer John has purchased a lush n... 阅读全文
posted @ 2018-06-18 21:07 StarHai 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 拓展kmp是对KMP算法的扩展,它解决如下问题:定义母串S,和字串T,设S的长度为n,T的长度为m,求T与S的每一个后缀的最长公共前缀,也就是说,设extend数组,extend[i]表示T与S[i,n-1]的最长公共前缀,要求出所有extend[i](0=P如下图:... 阅读全文
posted @ 2018-06-07 00:49 StarHai 阅读(337) 评论(0) 推荐(1) 编辑