08 2021 档案
方格取数与传纸条题解
摘要: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昴 阅读(494) 评论(0) 推荐(3)
树形DP【初级版】
摘要:START: 2021-08-14 10:00:37 在树形DP中,我们可以用数据模拟出一张图,一般是一棵树或是森林,所有的节点一般最多只有一个父节点。并且树里面没有重边或者环, 因此,一颗有N个节点的树有N-1条边。 讲这么多有点抽象,我们借用树形DP最经典的入门题来介绍树形DP的操作: 洛谷P1 阅读全文
posted @ 2021-08-14 11:27 Dragon昴 阅读(70) 评论(0) 推荐(2)
石子合并问题DP
摘要:START: 2021-08-10 14:29:04 1.问题描述: 有N堆石子排成一排,每堆石子有一定的数量。现要将N堆石子并成为一堆。合并的过程只能每次将相邻的两堆石子堆成一堆,每次合并花费的代价为这两堆石子的和,经过N-1次合并后成为一堆。求出总的代价最小值。 2. 输入输出示例输入 ​ 有多 阅读全文
posted @ 2021-08-10 15:43 Dragon昴 阅读(248) 评论(0) 推荐(2)
洛谷 P1832 A+B Problem(再升级)题解
摘要:START: 2021-08-09 15:28:07 题目链接: https://www.luogu.com.cn/problem/P1832 给定一个正整数n,求将其分解成若干个素数之和的方案总数。 输入格式 一行:一个正整数n 输出格式 一行:一个整数表示方案总数 输入输出样例 输入 #1复制 阅读全文
posted @ 2021-08-09 15:45 Dragon昴 阅读(261) 评论(0) 推荐(0)
背包问题
摘要: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昴 阅读(108) 评论(0) 推荐(1)
扩展欧几里得算法
摘要: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昴 阅读(153) 评论(2) 推荐(1)
洛谷 P2105 K皇后 题解
摘要:START: 2021-08-06 16:34:44 题目链接: https://www.luogu.com.cn/problem/P2105 题目详情: 小 Z 最近捡到了一个棋盘,他想在棋盘上摆放 K 个皇后。他想知道在他摆完这 K 个皇后之后,棋盘上还有多少个格子是不会被攻击到的。 注意:一个 阅读全文
posted @ 2021-08-06 17:00 Dragon昴 阅读(341) 评论(3) 推荐(2)
洛谷 P2330 [SCOI2005]繁忙的都市 题解
摘要:START: 2021-08-05 15:30:20 题目链接: https://www.luogu.com.cn/problem/P2330 题目详情: 城市C是一个非常繁忙的大都市,城市中的道路十分的拥挤,于是市长决定对其中的道路进行改造。城市C的道路是这样分布的:城市中有n个交叉路口,有些交叉 阅读全文
posted @ 2021-08-05 16:35 Dragon昴 阅读(182) 评论(0) 推荐(1)
POJ3723 Conscription 题解
摘要: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昴 阅读(105) 评论(0) 推荐(3)
洛谷 P2212 [USACO14MAR]Watering the Fields S 题解
摘要: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昴 阅读(111) 评论(0) 推荐(1)
洛谷 P2872 [USACO07DEC]Building Roads S 题解
摘要:2021-08-03 15:49:06 链接: https://www.luogu.com.cn/problem/P2872 题目描述: Farmer John had just acquired several new farms! He wants to connect the farms wi 阅读全文
posted @ 2021-08-03 16:38 Dragon昴 阅读(205) 评论(0) 推荐(4)
洛谷 P1347 排序 题解
摘要:2021-08-02 15:50:19 链接: https://www.luogu.com.cn/problem/P1347 题目内容: 一个不同的值的升序排序数列指的是一个从左到右元素依次增大的序列,例如,一个有序的数列 A,B,C,D 表示A<B,B<C,C<D。在这道题中,我们将给你一系列形如 阅读全文
posted @ 2021-08-02 16:53 Dragon昴 阅读(612) 评论(2) 推荐(3)
洛谷 P1346 电车 题解
摘要:2021-08-02 09:11:29 链接 https://www.luogu.com.cn/problem/P1346 题目描述 在一个神奇的小镇上有着一个特别的电车网络,它由一些路口和轨道组成,每个路口都连接着若干个轨道,每个轨道都通向一个路口(不排除有的观光轨道转一圈后返回路口的可能)。在每 阅读全文
posted @ 2021-08-02 09:39 Dragon昴 阅读(138) 评论(0) 推荐(2)
Codeforces Round #736 (Div. 2) A题题解
摘要:2021-08-02 08:34:33 链接 https://codeforces.com/contest/1549/problem/A 题目内容 A. Gregor and Cryptography time limit per test1 second memory limit per test 阅读全文
posted @ 2021-08-02 08:34 Dragon昴 阅读(115) 评论(0) 推荐(2)
P1339 [USACO09OCT]Heat Wave G 题解
摘要:2021-08-01 22:17:41 链接: https://www.luogu.com.cn/problem/P1339 题目描述 有一个 n 个点 m 条边的无向图,请求出从 s 到 t 的最短路长度。 输入格式 第一行四个正整数 n,m,s,t。 接下来 m 行,每行三个正整数 u,v,w, 阅读全文
posted @ 2021-08-01 22:20 Dragon昴 阅读(218) 评论(0) 推荐(2)
洛谷P1038 [NOIP2003 提高组] 神经网络 题解
摘要:2021-08-01 19:56:56 题目: https://www.luogu.com.cn/problem/P1038 描述: 题目背景 人工神经网络(Artificial Neural Network)是一种新兴的具有自我学习能力的计算系统,在模式识别、函数逼近及贷款风险评估等诸多领域有广泛 阅读全文
posted @ 2021-08-01 20:20 Dragon昴 阅读(802) 评论(4) 推荐(2)