xinyu04

导航

2022年5月13日 #

LeetCode 279 Perfect Squares DP

摘要: Given an integer n, return the least number of perfect square numbers that sum to n. A perfect square is an integer that is the square of an integer; 阅读全文

posted @ 2022-05-13 03:45 Blackzxy 阅读(18) 评论(0) 推荐(0) 编辑

2022年5月12日 #

LeetCode 198. House Robber DP

摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文

posted @ 2022-05-12 17:30 Blackzxy 阅读(14) 评论(0) 推荐(0) 编辑

LeetCode 221 Maximal Square DP

摘要: Given an m x n binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. Solution 设 \(dp[i][j]\) 表示能到达位置 阅读全文

posted @ 2022-05-12 04:18 Blackzxy 阅读(19) 评论(0) 推荐(0) 编辑

2022年5月10日 #

LeetCode 72 Edit Distance DP

摘要: Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You have the following three operations 阅读全文

posted @ 2022-05-10 20:40 Blackzxy 阅读(11) 评论(0) 推荐(0) 编辑

Deep Learning Week5 Notes

摘要: 1. Cross-Entropy Loss \(\textbf{MSE }\text{is justified in Euclidean space. But there is no sense in the classification context, because the class val 阅读全文

posted @ 2022-05-10 18:20 Blackzxy 阅读(20) 评论(0) 推荐(0) 编辑

LeetCode 91 Decode Ways DP

摘要: A message containing letters from A-Z can be encoded into numbers using the following mapping: 'A' → "1" 'B' → "2" ... 'Z' → "26" To decode an encoded 阅读全文

posted @ 2022-05-10 05:06 Blackzxy 阅读(14) 评论(0) 推荐(0) 编辑

2022年5月9日 #

LeetCode 64 Minimum Path Sum DP

摘要: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path. 阅读全文

posted @ 2022-05-09 03:54 Blackzxy 阅读(11) 评论(0) 推荐(0) 编辑

2022年5月7日 #

Deep Learning Week4 Notes

摘要: 1. DAG Networks $\text{If }(a_1,..,a_Q) = \phi(b_1,...,b_R),\text{ we use the notation:} $ \[ \begin{align} [\frac{\partial a}{\partial b}]&=J_{\phi}^ 阅读全文

posted @ 2022-05-07 21:06 Blackzxy 阅读(37) 评论(0) 推荐(0) 编辑

LibreOJ 10011 愤怒的牛 二分

摘要: 农夫约翰建造了一座有 \(n\) 间牛舍的小屋,牛舍排在一条直线上,第 \(i\) 间牛舍在 \(x_i\) 的位置,但是约翰的 \(m\) 头牛对小屋很不满意,因此经常互相攻击。约翰为了防止牛之间互相伤害,因此决定把每头牛都放在离其它牛尽可能远的牛舍。也就是要最大化最近的两头牛之间的距离。 牛们并 阅读全文

posted @ 2022-05-07 02:41 Blackzxy 阅读(28) 评论(0) 推荐(0) 编辑

2022年5月6日 #

LiberOJ 10014 数列分段 II 二分

摘要: 题意 给定长度为 \(N\) 的序列 \(A\),要将其划分为连续的 \(M\) 段,并最小化每一段总和的最大值。 输入格式 第1行包含两个正整数 \(N,M\) 第2行包含 \(N\) 个空格隔开的非负整数 \(A_i\),含义如题目所述。 输出格式 仅包含一个正整数,即每段和最大值最小为多少。 阅读全文

posted @ 2022-05-06 04:32 Blackzxy 阅读(22) 评论(0) 推荐(0) 编辑