上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 26 下一页
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4104 【题解】 脑洞+找规律做出来的。。 我用样例作为说明吧 样例给了我们这个 AAAC.A B 看起来没啥用 这是那个矩阵的最后一列对吧。 第一列是什么呢?我们都知道,按字典序排列。 .AA 阅读全文
posted @ 2017-06-03 11:41 Galaxies 阅读(192) 评论(0) 推荐(0)
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=3211 【题解】 区间开根号,由于每个数被开根号不会很多次就变成1,每次我们暴力开根下去,同时记录s[x]表示x这个区间内是不是全是1,如果是就不用开下去了 这样保证了每个数最多被开不多次。 # 阅读全文
posted @ 2017-06-03 11:09 Galaxies 阅读(174) 评论(0) 推荐(0)
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4897 【题解】 第一次看这题想的是f[l,r]的区间dp发现仅记录这两个好像不能转移啊 会出现abaca这种情况,也就是拿走的段在原序列中不连续。 考虑为什么会出现这个情况,肯定是这三个a里的 阅读全文
posted @ 2017-06-03 09:47 Galaxies 阅读(286) 评论(0) 推荐(0)
摘要: 传送门: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)
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=3685 【题解】 写个set+fread即可。 # include <set> # include <stdio.h> # include <string.h> # include <iostr 阅读全文
posted @ 2017-06-01 16:11 Galaxies 阅读(177) 评论(0) 推荐(0)
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1391 【题解】 简单最小割建模。 加当前弧优化!!! # include <queue> # include <stdio.h> # include <string.h> # include 阅读全文
posted @ 2017-06-01 15:54 Galaxies 阅读(212) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 26 下一页