摘要: 梯度下降法解决优化的问题 考虑优化问题 \[minf(x) = x_1^2 + 2x_2^2 + 4 \] 1. 写出梯度算法求解该问题的迭代公式,详细阐述迭代公式每项的意义。 \[f(x)= x_1^2 + 2x_2^2 + 4 \tag{1} \]\[\frac {\partial f(x)} 阅读全文
posted @ 2023-09-12 22:33 value0 阅读(53) 评论(0) 推荐(0) 编辑
摘要: Codeforces Round 895 (Div. 3) A. Two Vessels 解题思路: \(d = \lceil {\frac {abs(a - b)} 2}\rceil\) \(ans = \lceil {\frac d c}\rceil\) 代码: #include <bits/s 阅读全文
posted @ 2023-09-12 20:27 value0 阅读(11) 评论(0) 推荐(0) 编辑
摘要: Codeforces Round 897 (Div. 2) A. green_gold_dog, array and permutation 分析: 由题意: \[c_i = a_i - b_i \]\(c_i\)种类最多就是\(n\)个数都不同。 若\(a_i\)不断变大,\(b_i\)不断变小, 阅读全文
posted @ 2023-09-12 17:14 value0 阅读(24) 评论(0) 推荐(0) 编辑
摘要: Codeforces Round 896 (Div. 2) A. Make It Zero 分析: 如果\(n\)为偶数,那么a56爆大奖在线娱乐们可以选定整个数组操作两次,所有元素必定会为0。 如果\(n\)为奇数,那么\(n-1\)必定为偶数,先将后\(n-1\)个数变为0,然后同理选定第一个数和第二个数操作两次 阅读全文
posted @ 2023-09-12 13:37 value0 阅读(36) 评论(0) 推荐(1) 编辑