摘要: 类似拓扑排序的思想,每次从最末端的节点收缩。记录收缩过程中每个节点的红点和黑点的数量,计算每条边被使用的次数,复杂度O(2*N)。 阅读全文
posted @ 2017-05-26 14:14 爱种树的码农 阅读(184) 评论(0) 推荐(0) 编辑
摘要: D - 3N Numbers Time limit : 2sec / Memory limit : 256MB Score : 500 points Problem Statement Let N be a positive integer. There is a numerical sequenc 阅读全文
posted @ 2017-05-20 22:51 爱种树的码农 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 1572 宝岛地图 题目来源: CodeForces 基准时间限制:1 秒 空间限制:131072 KB 1572 宝岛地图 题目来源: CodeForces 基准时间限制:1 秒 空间限制:131072 KB 1572 宝岛地图 题目来源: CodeForces 基准时间限制:1 秒 空间限制:1 阅读全文
posted @ 2017-05-18 23:35 爱种树的码农 阅读(409) 评论(0) 推荐(0) 编辑
摘要: D. Array Division time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output D. Array Division time 阅读全文
posted @ 2017-05-17 18:09 爱种树的码农 阅读(191) 评论(0) 推荐(0) 编辑
摘要: H. HighwayIn ICPCCamp there were n towns conveniently numbered with 1,2,...,n connected with (n−1) roads. Thei-th road connecting towns a i and b i ha 阅读全文
posted @ 2017-05-15 19:23 爱种树的码农 阅读(1000) 评论(0) 推荐(0) 编辑
摘要: E. Partial SumBobo has a integer sequence a 1 ,a 2 ,...,a n of length n. Each time, he selects two ends 0 ≤ l < r ≤ n andadd |∑ rj=l+1 a j | − C into 阅读全文
posted @ 2017-05-15 19:12 爱种树的码农 阅读(554) 评论(0) 推荐(0) 编辑
摘要: C. Success Rate time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. Success Rate time lim 阅读全文
posted @ 2017-05-08 14:40 爱种树的码农 阅读(184) 评论(0) 推荐(0) 编辑
摘要: Building Shops Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Problem Description HDU’s n classrooms are on a line 阅读全文
posted @ 2017-05-07 20:57 爱种树的码农 阅读(817) 评论(0) 推荐(0) 编辑
摘要: 1084 矩阵取数问题 V2 基准时间限制:2 秒 空间限制:131072 KB 1084 矩阵取数问题 V2 基准时间限制:2 秒 空间限制:131072 KB 1084 矩阵取数问题 V2 基准时间限制:2 秒 空间限制:131072 KB 一个M*N矩阵中有不同的正整数,经过这个格子,就能获得 阅读全文
posted @ 2017-05-01 20:48 爱种树的码农 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 1259 整数划分 V2 基准时间限制:1 秒 空间限制:131072 KB 1259 整数划分 V2 基准时间限制:1 秒 空间限制:131072 KB 1259 整数划分 V2 基准时间限制:1 秒 空间限制:131072 KB 将N分为若干个整数的和,有多少种不同的划分方式,例如:n = 4, 阅读全文
posted @ 2017-04-28 18:19 爱种树的码农 阅读(1122) 评论(0) 推荐(0) 编辑