摘要:
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4025 【题解】 考虑对时间分治,用可撤回的启发式合并并查集来维护连通性。 二分图的条件是没有奇环,用并查集判即可。 对于时间区间[l,r],如果边在这期间都存在,那么就加入并查集,对于剩下的边 阅读全文
posted @ 2017-06-02 23:05
Galaxies
阅读(171)
评论(0)
推荐(0)
摘要:
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=3969 【题解】 二分答案x,贪心选取,如果选取了i个,有j对,那么要满足i<=2*j*k(不然有数就没位置放了) # include <stdio.h> # include <string.h 阅读全文
posted @ 2017-06-02 21:20
Galaxies
阅读(266)
评论(0)
推荐(0)
摘要:
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=3709 【题解】 打完怪最后的体力是固定的,设为lst 我们考虑回血量>=扣血量的怪,这些肯定优先打,顺序肯定是按照扣血量从小到大打,这一定是最优策略,打不了就是NIE了 接着由于lst固定,我 阅读全文
posted @ 2017-06-02 20:34
Galaxies
阅读(237)
评论(0)
推荐(0)
该文被密码保护。 阅读全文
posted @ 2017-06-02 20:04
Galaxies
阅读(28)
评论(0)
推荐(0)
摘要:
【题目大意】 f(i)=((Af(i-1)+B)/(Cf(i-1)+D)) mod P。 给出f(0), A, B, C, D, P, n,求f(n)。 多组数据T<=1e4 n<=1e18, P <= 1e9, |f(0)|,|A|,|B|,|C|,|D| <= 1e9 保证任何时候存在逆元。 【 阅读全文
posted @ 2017-06-02 15:23
Galaxies
阅读(225)
评论(0)
推荐(0)

浙公网安备 33010602011771号