09 2018 档案

摘要:目录: B - Fraction D - Triangle F - Harmonic Value Description H - Sequence I I - Sequence II B题:HDU 5912 - Fraction - [递归] 题目链接:http://acm.hdu.edu.cn/s 阅读全文
posted @ 2018-09-24 20:47 Dilthey 阅读(583) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://poj.org/problem?id=3974 Time Limit: 15000MS Memory Limit: 65536K Description Andy the smart computer science student was attending an algo 阅读全文
posted @ 2018-09-23 23:52 Dilthey 阅读(356) 评论(0) 推荐(0) 编辑
摘要:题目链接:传送门 描述 很久很久以前,森林里住着一群兔子。有一天,兔子们想要研究自己的 DNA 序列。我们首先选取一个好长好长的 DNA 序列(小兔子是外星生物,DNA 序列可能包含 26 个小写英文字母),然后我们每次选择两个区间,询问如果用两个区间里的 DNA 序列分别生产出来两只兔子,这两个兔 阅读全文
posted @ 2018-09-23 22:26 Dilthey 阅读(513) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://poj.org/problem?id=1426 Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation con 阅读全文
posted @ 2018-09-23 20:47 Dilthey 阅读(603) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://hihocoder.com/problemset/problem/1829 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 Lara Croft, the fiercely i 阅读全文
posted @ 2018-09-22 23:07 Dilthey 阅读(166) 评论(0) 推荐(0) 编辑
摘要:题目链接:校内OJ的题目,就不放链接了。 PS.可以说是本次9月月赛唯一的一道有一定难度的题目了。 题解: 考虑状压DP,假设 $sta$ 是一个二进制数,代表当前 $n$ 个人有几个是在队伍里的,剩下几个是没在队伍里的。 假设 $dp[sta][h]$:代表了当前 $sta$ 状态下,队伍最尾部那 阅读全文
posted @ 2018-09-22 22:51 Dilthey 阅读(260) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://poj.org/problem?id=3279 Sample Input Sample Output 题意: 给出 $M$ 行 $N$ 的矩阵,每个元素只为 $0$ 或者 $1$,分别代表白块和黑块, 每次可以翻转一个元素,使得它可以从黑变白或者从白变黑,但是上下左右相邻的四 阅读全文
posted @ 2018-09-22 20:20 Dilthey 阅读(569) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://poj.org/problem?id=3349 Time Limit: 4000MS Memory Limit: 65536K Description You may have heard that no two snowflakes are alike. Your task 阅读全文
posted @ 2018-09-20 22:00 Dilthey 阅读(262) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://poj.org/problem?id=3278 Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He 阅读全文
posted @ 2018-09-19 23:07 Dilthey 阅读(431) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3983 题意: 给出一个长度为 $9$ 的字符串 $s$,且 $s$ 仅仅由三种字符组成:$3$ 个 "g"、$3$ 个 "a"、$3$ 个 "o"; 现在,每次可以 阅读全文
posted @ 2018-09-19 21:47 Dilthey 阅读(178) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://nanti.jisuanke.com/t/31453 After Incident, a feast is usually held in Hakurei Shrine. This time Reimu asked Kokoro to deliver a Nogaku sh 阅读全文
posted @ 2018-09-17 22:55 Dilthey 阅读(160) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://nanti.jisuanke.com/t/31447 "Oh, There is a bipartite graph.""Make it Fantastic." X wants to check whether a bipartite graph is a fantasti 阅读全文
posted @ 2018-09-12 22:54 Dilthey 阅读(176) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2314 The terrorist group leaded by a well known international terrorist Ben Bladen i 阅读全文
posted @ 2018-09-12 21:35 Dilthey 阅读(194) 评论(0) 推荐(0) 编辑
摘要:1、网络 网络,一种特殊的有向图,一个有向带权图 $G = (V,E)$,指定两个节点 $s$ 和 $t$($s \ne t$),分别称为源点和汇点,每条边的权值称为容量 $c$,特别地,若边 $\left\langle {u,v} \right\rangle \notin E$,则 $c\left 阅读全文
posted @ 2018-09-12 20:29 Dilthey 阅读(349) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://nanti.jisuanke.com/t/31460 Ryuji is not a good student, and he doesn't want to study. But there are n books he should learn, each book ha 阅读全文
posted @ 2018-09-10 14:59 Dilthey 阅读(352) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://nanti.jisuanke.com/t/31459 样例输入 3 1 4 4 1 3 3 样例输入 样例输出 10 样例输出 题意: 二维平面上给出 $n$ 个点,每个点坐标 $\left( {x,y} \right)$ 代表一个从原点到 $\left( {x,y} \r 阅读全文
posted @ 2018-09-10 14:26 Dilthey 阅读(268) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://nanti.jisuanke.com/t/31451 Given a rooted tree ( the root is node $1$ ) of $N$ nodes. Initially, each node has zero point. Then, you need 阅读全文
posted @ 2018-09-09 21:05 Dilthey 阅读(166) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://nanti.jisuanke.com/t/31452 A prime number (or a prime) is a natural number greater than $1$ that cannot be formed by multiplying two smal 阅读全文
posted @ 2018-09-09 18:20 Dilthey 阅读(226) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3642 Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Descript 阅读全文
posted @ 2018-09-08 20:18 Dilthey 阅读(576) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://nanti.jisuanke.com/t/31001 题意: 一带权有向图,有 n 个节点编号1~n,m条有向边,现在一人从节点 1 出发,他有最多 k 次机会施展魔法使得某一条边的权变成 0,问他走到节点 n 的最小权值为多少。 题解: 将dist数组和vis数组都扩展一 阅读全文
posted @ 2018-09-05 21:50 Dilthey 阅读(473) 评论(2) 推荐(0) 编辑
摘要:目录: 从一道题目出发 —— Luogu 4779 - 【模板】单源最短路径(标准版) Bellman-Ford算法 SPFA算法 SLF+swap优化的SPFA(但它还是死了) Dijkstra算法 优先队列优化Dijkstra算法 手写二叉堆优化Dijkstra算法 线段树优化Dijkstra算 阅读全文
posted @ 2018-09-04 13:29 Dilthey 阅读(2292) 评论(2) 推荐(3) 编辑
摘要:题目链接:https://nanti.jisuanke.com/t/30999 样例输入258 样例输出814 题意: squarefree数是指不含有完全平方数( 1 除外)因子的数, 现在一个数字 $n$,可以表示成两个squarefree数 $a,b$ 相乘,即 $n = ab$, 假设 $f 阅读全文
posted @ 2018-09-03 21:58 Dilthey 阅读(264) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6441 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Descripti 阅读全文
posted @ 2018-09-03 11:24 Dilthey 阅读(270) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://nanti.jisuanke.com/t/30996 During tea-drinking, princess, amongst other things, asked why has such a good-natured and cute Dragon impriso 阅读全文
posted @ 2018-09-03 10:29 Dilthey 阅读(793) 评论(0) 推荐(1) 编辑
摘要:题目链接:https://nanti.jisuanke.com/t/30994 样例输入: 样例输出: 样例输入: 样例输出: 题解: 把n道题目做了或者没做作为状态,裸的状压DP。 其中当前的时间 t,就是当前做了的题目数量加上1。 AC代码: 时间复杂度 $O\left( {2^n \cdot 阅读全文
posted @ 2018-09-01 19:55 Dilthey 阅读(577) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://nanti.jisuanke.com/t/30990 Alice, a student of grade 6, is thinking about an Olympian Math problem, but she feels so despair that she cri 阅读全文
posted @ 2018-09-01 19:33 Dilthey 阅读(795) 评论(0) 推荐(0) 编辑