摘要: There are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string painter. With the help 阅读全文
posted @ 2019-07-30 21:17 ALEZ 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Problem Description A thief is running away!We can consider the city where he locates as an undirected graph in which nodes stand for crosses and edge 阅读全文
posted @ 2019-07-30 21:10 ALEZ 阅读(431) 评论(0) 推荐(0) 编辑
摘要: 最小点覆盖 = 最大匹配数 有向图的最小边覆盖 = 点数-最大匹配数 无向图的最小边覆盖=点数-最大匹配数/2 独立集个数 = 点数 - 最大匹配数 方法: 染色法 行列法 反键法 阅读全文
posted @ 2019-07-30 21:02 ALEZ 阅读(141) 评论(0) 推荐(0) 编辑
摘要: HDU 过山车 RPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partner,Gr 阅读全文
posted @ 2019-07-30 17:29 ALEZ 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 条件: 对于方程 f[i][j]=min(f[i][k]+f[k+1][j]+cos(i)(j));所形成的区间dp 这里的k可以用平行四边形优化 s[i][j-1]<=s[i][j]<=s[i+1][j] s[i][j]=k; 优化即可 阅读全文
posted @ 2019-07-29 21:42 ALEZ 阅读(234) 评论(0) 推荐(0) 编辑
摘要: It has recently been discovered how to run open-source software on the Y-Crate gaming device. A number of enterprising designers have developed Advent 阅读全文
posted @ 2019-07-29 20:29 ALEZ 阅读(184) 评论(0) 推荐(0) 编辑
摘要: Delay Constrained Maximum Capacity Path Consider an undirected graph with N vertices, numbered from 1 to N, and M edges. The vertex numbered with 1 co 阅读全文
posted @ 2019-07-29 20:25 ALEZ 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 每个人都会有幸运数字,有种幸运数字是这样定义的: 如果 X 是幸运数字,则 X 在 m 进制下的表示为 x1x2...xk,一定有 x1<=x2<=...<=xk,其 中 k 可以表示 X 在 m 进制下的位数。 这样的数字可能有无穷多个的,但是如果是在 m 进制下位数不超过 n 的幸运数字,就 应 阅读全文
posted @ 2019-07-29 08:41 ALEZ 阅读(307) 评论(1) 推荐(0) 编辑
摘要: XX星有许多城市,城市之间通过一种奇怪的高速公路SARS(Super Air Roam Structure 超级空中漫游结构)进行交流,每条SARS都对行驶在上面的Flycar限制了固定的Speed,同时XX星人对 Flycar的“舒适度”有特殊要求,即乘坐过程中最高速度与最低速度的差越小乘坐越舒服 阅读全文
posted @ 2019-07-28 18:33 ALEZ 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 暑假到了,大部分学生都回家了,只有少量竞赛学生还在学校里。 学校打算逐步把教学楼都关闭。以减少运营成本。 学校里的N栋教学楼(编号1到N)通过M条双向道路连接起来。每关闭了一栋楼,与该楼相连的所有道路同时都会被关闭。 何老板想知道,学校每关闭一栋楼,剩下的处于开放状态的教学楼是否是连通的。连通就是指 阅读全文
posted @ 2019-07-28 18:12 ALEZ 阅读(163) 评论(0) 推荐(0) 编辑