摘要:
题目链接: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 阅读全文
摘要:
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2314 The terrorist group leaded by a well known international terrorist Ben Bladen i 阅读全文
摘要:
1、网络 网络,一种特殊的有向图,一个有向带权图 $G = (V,E)$,指定两个节点 $s$ 和 $t$($s \ne t$),分别称为源点和汇点,每条边的权值称为容量 $c$,特别地,若边 $\left\langle {u,v} \right\rangle \notin E$,则 $c\left 阅读全文
摘要:
题目链接: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 阅读全文
摘要:
题目链接:https://nanti.jisuanke.com/t/31459 样例输入 3 1 4 4 1 3 3 样例输入 样例输出 10 样例输出 题意: 二维平面上给出 $n$ 个点,每个点坐标 $\left( {x,y} \right)$ 代表一个从原点到 $\left( {x,y} \r 阅读全文
摘要:
题目链接: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 阅读全文
摘要:
题目链接: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 阅读全文
摘要:
题目链接: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 阅读全文
摘要:
题目链接:https://nanti.jisuanke.com/t/31001 题意: 一带权有向图,有 n 个节点编号1~n,m条有向边,现在一人从节点 1 出发,他有最多 k 次机会施展魔法使得某一条边的权变成 0,问他走到节点 n 的最小权值为多少。 题解: 将dist数组和vis数组都扩展一 阅读全文
摘要:
目录: 从一道题目出发 —— Luogu 4779 - 【模板】单源最短路径(标准版) Bellman-Ford算法 SPFA算法 SLF+swap优化的SPFA(但它还是死了) Dijkstra算法 优先队列优化Dijkstra算法 手写二叉堆优化Dijkstra算法 线段树优化Dijkstra算 阅读全文
摘要:
题目链接:https://nanti.jisuanke.com/t/30999 样例输入258 样例输出814 题意: squarefree数是指不含有完全平方数( 1 除外)因子的数, 现在一个数字 $n$,可以表示成两个squarefree数 $a,b$ 相乘,即 $n = ab$, 假设 $f 阅读全文
摘要:
题目链接: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 阅读全文
摘要:
题目链接:https://nanti.jisuanke.com/t/30996 During tea-drinking, princess, amongst other things, asked why has such a good-natured and cute Dragon impriso 阅读全文
摘要:
题目链接:https://nanti.jisuanke.com/t/30994 样例输入: 样例输出: 样例输入: 样例输出: 题解: 把n道题目做了或者没做作为状态,裸的状压DP。 其中当前的时间 t,就是当前做了的题目数量加上1。 AC代码: 时间复杂度 $O\left( {2^n \cdot 阅读全文
摘要:
题目链接: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 阅读全文