上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页

2019年3月16日

CF 225C Barcode(DP)

摘要: 传送门:点我 You've got an n × m pixel picture. Each pixel can be white or black. Your task is to change the colors of as few pixels as possible to obtain a 阅读全文

posted @ 2019-03-16 17:24 Esquecer 阅读(235) 评论(0) 推荐(0) 编辑

2019年3月13日

PTA 1067 Sort with Swap(0, i) (25 分)(思维)

摘要: 传送门:点我 Given any permutation of the numbers {0, 1, 2,..., N−1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operat 阅读全文

posted @ 2019-03-13 17:12 Esquecer 阅读(210) 评论(0) 推荐(0) 编辑

2019年3月9日

CF 317 A. Lengthening Sticks(容斥+组合数学)

摘要: 传送门:点我 A. Lengthening Sticks time limit per test 1 second You are given three sticks with positive integer lengths of a, b, and c centimeters. You can 阅读全文

posted @ 2019-03-09 11:27 Esquecer 阅读(323) 评论(0) 推荐(0) 编辑

2019年3月5日

天梯赛 最短工期(拓扑排序)

摘要: 7-12 最短工期 (25 分) 一个项目由若干个任务组成,任务之间有先后依赖顺序。项目经理需要设置一系列里程碑,在每个里程碑节点处检查任务的完成情况,并启动后续的任务。现给定一个项目中各个任务之间的关系,请你计算出这个项目的最早完工时间。 输入格式: 首先第一行给出两个正整数:项目里程碑的数量 N 阅读全文

posted @ 2019-03-05 22:34 Esquecer 阅读(952) 评论(0) 推荐(0) 编辑

HDU6446 Tree and Permutation(树上DP)

摘要: 传送门:点我 Tree and Permutation Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2191 Accepted Submiss 阅读全文

posted @ 2019-03-05 16:11 Esquecer 阅读(140) 评论(0) 推荐(0) 编辑

2019年2月27日

HDU6030 Happy Necklace(递推+矩阵快速幂)

摘要: 传送门:点我 Little Q wants to buy a necklace for his girlfriend. Necklaces are single strings composed of multiple red and blue beads. Little Q desperately 阅读全文

posted @ 2019-02-27 17:26 Esquecer 阅读(233) 评论(0) 推荐(0) 编辑

2019年2月26日

矩阵快速幂

摘要: 自用 阅读全文

posted @ 2019-02-26 14:12 Esquecer 阅读(123) 评论(0) 推荐(0) 编辑

2019年2月24日

堆优化dij

摘要: #include #include #include using namespace std; int n,m,S,tot,Next[500010],head[20000],tree[500010],val[500010]; bool visit[20000]; long long dis[20000]; struct cmp { bool operator()(int a,int b)... 阅读全文

posted @ 2019-02-24 22:34 Esquecer 阅读(269) 评论(0) 推荐(0) 编辑

2019年1月26日

leecode 937 Reorder Log Files (模拟)

摘要: 传送门:点我 You have an array of logs. Each log is a space delimited string of words. For each log, the first word in each log is an alphanumeric identifie 阅读全文

posted @ 2019-01-26 22:55 Esquecer 阅读(209) 评论(0) 推荐(0) 编辑

2019年1月23日

leecode 978. Longest Turbulent Subarray(最长连续波动序列,DP or 滚动数组)

摘要: 传送门:点我 978. Longest Turbulent Subarray 978. Longest Turbulent Subarray A subarray A[i], A[i+1], ..., A[j] of A is said to be turbulent if and only if: 阅读全文

posted @ 2019-01-23 22:37 Esquecer 阅读(264) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页

导航