摘要: 题目:Matrix Power Series 传送门:http://poj.org/problem?id=3233 分析: 方法一:引用Matrix67大佬的矩阵十题:这道题两次二分,相当经典。首先我们知道,A^i可以二分求出。然后我们需要对整个题目的数据规模k进行二分。比如,当k=6时,有:$ S 阅读全文
posted @ 2018-11-18 19:48 hjj1871984569 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 题目:Maximum Matching 传送门:http://codeforces.com/contest/1038/problem/E 分析: 一个块拥有{color1,val,color2},两个块相连要求相连处颜色相同,求价值最大的连接方案。 关心到color最大为4,以4种颜色为点,对于每个 阅读全文
posted @ 2018-09-14 14:12 hjj1871984569 阅读(361) 评论(0) 推荐(0) 编辑
摘要: 题目:染色 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=2243 分析: (1)很裸的树链剖分,然而我忘了树剖怎么打(其实是代码太长不想打,逃 (2)于是挖了一个大坑,把自己埋下去了(全世界是不是只有我傻傻打了LCT? (3)卡卡OJ竟然过 阅读全文
posted @ 2017-04-18 01:08 hjj1871984569 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 题目:Toll 传送门:http://acm.csu.edu.cn/csuoj/problemset/problem?pid=1806 题目简述:给定n个点m条有向边的有向图,每条边的花费是$b_i * t +d_i$,设f(t)表示给定t的时候1-n的最小花费,求:${\frac{\int_0^T 阅读全文
posted @ 2017-04-04 17:28 hjj1871984569 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 题目:Just a Joke 传送门:http://acm.hdu.edu.cn/showproblem.php?pid=4969 分析: 呀,根本不会做,5555~(逃 http://blog.csdn.net/morejarphone/article/details/51766422 http: 阅读全文
posted @ 2017-04-04 16:16 hjj1871984569 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 题目:The area 传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1071 分析: (1)推抛物线和直线的方程式,然后直接用微积分计算就好了。 (2)看到一种很有趣的解法"抛物线弓形面积阿基米德算法",传送门:http://www.cnblogs.c 阅读全文
posted @ 2017-04-03 22:03 hjj1871984569 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 题目:Ellipse 传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1724 题目简述:给定一个椭圆,求椭圆上一个区间[l,r]的面积。 分析: (1)椭圆方程式:$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$。 (2)椭圆上[l 阅读全文
posted @ 2017-04-03 19:41 hjj1871984569 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 题目:天真的因数分解 传送门:https://vijos.org/p/1889 题目描述: 小岛: 什么叫做因数分解呢? doc : 就是将给定的正整数n, 分解为若干个素数连乘的形式. 小岛: 那比如说 n=12 呢? doc : 那么就是 12 = 2 * 2 * 3 呀. 小岛: 呜呜, 好难 阅读全文
posted @ 2016-12-28 00:39 hjj1871984569 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 中文题目:提交作业 原文题目:Turning in Homework 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=3379 中文题目:提交作业 原文题目:Turning in Homework 传送门:http://www.lydsy.co 阅读全文
posted @ 2016-11-10 10:19 hjj1871984569 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 中文题目:工作安排 原文题目:Work Scheduling 传送门 中文题目:工作安排 原文题目:Work Scheduling 传送门 本题可以采用贪心 算法一:按工作时间排序,如果工作能按时完成的工作就按时完成,如果工作不能按时完成就把之前价值最小的工作和当前作比较,取最优的情况。考虑使用堆维 阅读全文
posted @ 2016-11-10 10:14 hjj1871984569 阅读(343) 评论(0) 推荐(0) 编辑