cherrychenlee

导航

 

2019年5月19日

摘要: 原文地址:https://www.jianshu.com/p/3c53dfd72334 问题描述 给你一个长度为$N$的01串,定义“答案”=该串中最长的连续1的长度。现有K次机会将其中的某个0改为1,现在求最大可能“答案”。 解题思路 遍历这$N$个数,将为0的位置push进数组vec中,只考虑数 阅读全文
posted @ 2019-05-19 19:42 cherrychenlee 阅读(279) 评论(0) 推荐(0) 编辑
 
摘要: 原文地址:https://www.jianshu.com/p/3555e50b026d 问题描述 一张包含$N$个节点、$N 1$条边的无向连通图,其中,节点从1到$N$进行编号,每条边的长度均为1。假设从1号节点出发并打算遍历图中所有节点,那么所需要的总路程至少是多少? 解题思路 一共$N 1$条 阅读全文
posted @ 2019-05-19 19:34 cherrychenlee 阅读(434) 评论(0) 推荐(0) 编辑
 
摘要: 原文地址:https://www.jianshu.com/p/7966a1ce47fc 问题描述 将一组非负整数组成的数组$h$作为柱状图中每个柱子的高度值,且每个柱子宽度为1。找出这个柱状图中所包含矩形的最大面积。 解题思路 使用分治法,最大矩形面积只可能有三种情况: 1. 取决于高度最小的柱子, 阅读全文
posted @ 2019-05-19 18:51 cherrychenlee 阅读(873) 评论(0) 推荐(0) 编辑
 
摘要: 原文地址:https://www.jianshu.com/p/3069df45b36a 问题描述 100元换零钱1元、2元、5元、10元、20元、50元有多少种组合方案? 解题思路 使用动态规划来求解,使用$F(N,M)$表示用不超过第$M$个面值(从小到大排序)的零钱来表示$N$的所有组合方案数, 阅读全文
posted @ 2019-05-19 18:35 cherrychenlee 阅读(123) 评论(0) 推荐(0) 编辑
 
摘要: 原文地址:https://www.jianshu.com/p/89d534c4ebf9 时间限制:1秒 空间限制:32768K 题目描述 There are N children standing in a line. Each child is assigned a rating value. Y 阅读全文
posted @ 2019-05-19 17:05 cherrychenlee 阅读(128) 评论(0) 推荐(0) 编辑
 

2019年5月15日

摘要: 原文地址:https://www.jianshu.com/p/7a9befd51aaa 问题描述 解题思路 找子问题 确定状态 确定状态转移方程 程序实现 人人为我 include include include using namespace std; const int MAXN = 1000; 阅读全文
posted @ 2019-05-15 16:52 cherrychenlee 阅读(144) 评论(0) 推荐(0) 编辑
 

2019年5月13日

摘要: 原文地址:https://www.jianshu.com/p/e528a9c6a509 2.1 概率论基础 全概率公式 贝叶斯法则(Bayes' theorem) 贝叶斯决策理论(Bayesian decision theory) 2.2 信息论基础 熵(entropy) 熵又称为自信息(self 阅读全文
posted @ 2019-05-13 08:54 cherrychenlee 阅读(417) 评论(0) 推荐(0) 编辑
 
摘要: 原文地址:https://www.jianshu.com/p/6daf218d2550 1.1 基本概念 + 自然语言指人类使用的语言,如汉语、英语等。 + 语言的两个基本属性:文字和声音。 + 自然语言处理 或称自然语言理解(Natural Language Understanding, NLU) 阅读全文
posted @ 2019-05-13 08:19 cherrychenlee 阅读(348) 评论(0) 推荐(0) 编辑
 

2019年5月10日

摘要: 原文地址:https://www.jianshu.com/p/19449c705838 时间限制:1秒 空间限制:32768K 题目描述 Given an array of integers, every element appears twice except for one. Find that 阅读全文
posted @ 2019-05-10 14:13 cherrychenlee 阅读(105) 评论(0) 推荐(0) 编辑
 
摘要: 原文地址:https://www.jianshu.com/p/c8612aef41af 时间限制:1秒 空间限制:32768K 题目描述 Given an array of integers, every element appears three times except for one. Fin 阅读全文
posted @ 2019-05-10 14:11 cherrychenlee 阅读(109) 评论(0) 推荐(0) 编辑