算法笔记
文章平均质量分 80
Acon_12
中科院研究生在读,算法爱好者。
展开
-
HDU-1023 Train Problem II(高精度+卡特兰数)
HDU-1023 Train Problem II(高精度+卡特兰数)Train Problem IITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13764 Accepted Submission(s): 7339Problem DescriptionAs we all know the Train Problem I, the原创 2021-03-22 21:20:15 · 172 阅读 · 0 评论 -
HDU-1051 Wooden Sticks(简单的贪心策略)
HDU-1051 Wooden Sticks(简单的贪心策略)Wooden SticksTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 30840 Accepted Submission(s): 12534Problem DescriptionThere is a pile of n wooden sticks. The length原创 2021-03-22 21:14:02 · 216 阅读 · 0 评论 -
HDU 1007 最近点对问题 Quoit Design(分治+贪心)
HDU Quoit Design(分治+贪心)Quoit DesignProblem DescriptionHave you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled awarded.In the field of Cyberground, the position of each toy is原创 2021-03-22 21:08:16 · 353 阅读 · 0 评论 -
HDU-1055 Color a Tree(贪心策略)
HDU-1055 Color a Tree(贪心策略) Color a TreeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3691 Accepted Submission(s): 1359Problem DescriptionBob is very interested in原创 2021-03-22 21:05:38 · 138 阅读 · 0 评论 -
卡特兰数(catalan数)总结 (卡特兰大数、卡特兰大数取模、卡特兰数应用)
卡特兰数(catalan数)总结 (卡特兰大数、卡特兰大数取模、卡特兰数应用) 本文讲解卡特兰数的各种递推公式,以及卡特兰数、卡特兰大数、卡特兰大数取模的代码实现,最后再顺带提一下卡特兰数的几个应用。 什么是卡特兰数呢?卡特兰数无非是一组有着某种规律的序列。重要的是它的应用。卡特兰数前几项为 : 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 208012, 742转载 2021-03-22 19:21:48 · 498 阅读 · 0 评论 -
HDU 1007 最近点对问题 Quoit Design(分治+贪心)
HDU 1007 Quoit Design(分治+贪心)Quoit DesignProblem DescriptionHave you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled awarded.In the field of Cyberground, the position of each t原创 2021-03-22 19:15:38 · 230 阅读 · 0 评论 -
HDU The Embarrassed Cryptographer 2303(同余模+线筛)
HDU The Embarrassed Cryptographer 2303(同余模+线筛)The Embarrassed CryptographerProblem DescriptionThe young and very promising cryptographer Odd Even has implemented the security module of a large system with thousands of users, which is now in use in his c原创 2021-03-22 19:10:21 · 87 阅读 · 0 评论 -
HDU Farm Irrigation 1198(bfs联通块或并查集)
HDU Farm Irrigation 1198Problem DescriptionBenny has a spacious farm land to irrigate. The farm land is a rectangle, and is divided into a lot of samll squares. Water pipes are placed in these squares. Different square has a different type of pipe. There原创 2021-03-22 19:07:31 · 97 阅读 · 0 评论 -
算法日记——动态规划之背包问题
算法日记——动态规划之背包问题前言01背包完全背包多重背包分组背包混合背包最后前言众所周知如果你开始在学动态规划了,那么背包问题你一定不会不会陌生。背包问题是动态规划中最为经典的问题,也是初学者较为头疼的一些问题。希望通过这篇大家能对背包问题中各种问题能有个更深层次的理解。01背包01背包是背包问题的最经典的一种类型。下面我们先看下这类题目基础描述。有 N 件物品和一个容量是 V 的背包。每件物品只能使用一次。第 i 件物品的体积是 vi,价值是 wi。求解将哪些物品装入背包,可使这些物品的原创 2020-09-19 14:31:57 · 206 阅读 · 0 评论 -
算法日记—动态规划中的最长上升子序列模型
目录算法日记—动态规划中的最长上升子序列模型基础模型-acwing895问题升级-acwing1017怪盗基德的滑翔翼在acwing-1017上的思维加深-acwing1014,482算法日记—动态规划中的最长上升子序列模型嗨,算法日记的第二篇如期而至,今天呢记录的是动态规划中最长上升子序列的模型,同时也会用acwing上的部分题目进行讲解,那么我们就开始吧。基础模型-acwing895给定一个长度为N的数列,求数值严格单调递增的子序列的长度最长是多少。输入格式第一行包含整数N。第二行包含N个原创 2020-09-05 17:49:27 · 203 阅读 · 0 评论 -
算法日记—动态规划之数字三角形模型
目录噢算法日记—动态规划之数字三角形模型经典模板题-acwing896数字三角形问题升级 -acwing1015 摘花生再升级—acwing1018最低通行费如果是同时求两个状态方案和最大呢-acwing1027传纸条本篇最后算法日记—动态规划之数字三角形模型动态规划一直是算法竞赛中最为经典的问题,这篇博客将讲解动态规划问题中的数字三角形模型。会以acwing上的例题作为对象。之后会专门对dp的思考模式写一篇。经典模板题-acwing896数字三角形给定一个如下图所示的数字三角形,从顶部出发,在原创 2020-09-02 17:25:40 · 616 阅读 · 0 评论