2021年8月15日
摘要:
START: 2021-08-15 17:10:14 题目链接: 方格取数:https://www.acwing.com/problem/content/1029/ 传纸条:https://www.acwing.com/problem/content/description/277/ 我们先来看第一
阅读全文
posted @ 2021-08-15 17:51
Dragon昴
阅读(457)
推荐(3)
2021年8月14日
摘要:
START: 2021-08-14 10:00:37 在树形DP中,我们可以用数据模拟出一张图,一般是一棵树或是森林,所有的节点一般最多只有一个父节点。并且树里面没有重边或者环, 因此,一颗有N个节点的树有N-1条边。 讲这么多有点抽象,我们借用树形DP最经典的入门题来介绍树形DP的操作: 洛谷P1
阅读全文
posted @ 2021-08-14 11:27
Dragon昴
阅读(42)
推荐(2)
2021年8月10日
摘要:
START: 2021-08-10 14:29:04 1.问题描述: 有N堆石子排成一排,每堆石子有一定的数量。现要将N堆石子并成为一堆。合并的过程只能每次将相邻的两堆石子堆成一堆,每次合并花费的代价为这两堆石子的和,经过N-1次合并后成为一堆。求出总的代价最小值。 2. 输入输出示例输入 有多
阅读全文
posted @ 2021-08-10 15:43
Dragon昴
阅读(218)
推荐(2)
2021年8月9日
摘要:
START: 2021-08-09 15:28:07 题目链接: https://www.luogu.com.cn/problem/P1832 给定一个正整数n,求将其分解成若干个素数之和的方案总数。 输入格式 一行:一个正整数n 输出格式 一行:一个整数表示方案总数 输入输出样例 输入 #1复制
阅读全文
posted @ 2021-08-09 15:45
Dragon昴
阅读(223)
推荐(0)
2021年8月8日
摘要:
START: 2021-08-08 08:39:54 问题一:01背包问题 相关问题链接: https://www.acwing.com/problem/content/2/ 问题详情: 有 N 件物品和一个容量是 V 的背包。每件物品只能使用一次。第 i 件物品的体积是 vi,价值是 wi。 求解
阅读全文
posted @ 2021-08-08 16:05
Dragon昴
阅读(80)
推荐(1)
2021年8月7日
摘要:
START: 2021-08-07 09:39:32 相关题目链接: https://www.luogu.com.cn/problem/P1082 https://www.acwing.com/problem/content/879/ 介绍: 为了介绍扩展欧几里得,我们先引入一个定理: 贝祖定理:
阅读全文
posted @ 2021-08-07 10:30
Dragon昴
阅读(125)
推荐(1)
2021年8月6日
摘要:
START: 2021-08-06 16:34:44 题目链接: https://www.luogu.com.cn/problem/P2105 题目详情: 小 Z 最近捡到了一个棋盘,他想在棋盘上摆放 K 个皇后。他想知道在他摆完这 K 个皇后之后,棋盘上还有多少个格子是不会被攻击到的。 注意:一个
阅读全文
posted @ 2021-08-06 17:00
Dragon昴
阅读(310)
推荐(2)
2021年8月5日
摘要:
START: 2021-08-05 15:30:20 题目链接: https://www.luogu.com.cn/problem/P2330 题目详情: 城市C是一个非常繁忙的大都市,城市中的道路十分的拥挤,于是市长决定对其中的道路进行改造。城市C的道路是这样分布的:城市中有n个交叉路口,有些交叉
阅读全文
posted @ 2021-08-05 16:35
Dragon昴
阅读(140)
推荐(1)
2021年8月4日
摘要:
start: 2021-08-04 16:56:50 题目链接: http://poj.org/problem?id=3723 题目内容: Description Windy has a country, and he wants to build an army to protect his co
阅读全文
posted @ 2021-08-04 21:08
Dragon昴
阅读(83)
推荐(3)
2021年8月3日
摘要:
2021-08-03 20:31:13 链接: https://www.luogu.com.cn/problem/P2212 题目详情: Due to a lack of rain, Farmer John wants to build an irrigation system to send wa
阅读全文
posted @ 2021-08-03 20:44
Dragon昴
阅读(67)
推荐(1)