摘要: 下面的诗歌是mcr130102改编沙盒游戏Minecraft内容的,如果要转载,请联系作者。 在博客园观看效果更佳(点我跳转) OI之诗(2.0) 0x906a1: 我看到你所说的那位OIer了。 0x906a2:mcr130102? 0x906a1: 是的。小心。他已达到了更高的境界。他能阅读我们 阅读全文
posted @ 2024-07-10 08:52 mcr130102 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 题目 P0764. 小可的糖果盒 思路 题目要求是贪心,但是个人觉得dp更有性价比 代码 #include <iostream> #include <vector> #include <algorithm> using namespace std; int min_candies(int n, in 阅读全文
posted @ 2024-06-29 11:22 mcr130102 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 题目 #P0401. 逆波兰表达式 思路 都写着递归了,还算简单 代码 #include <iostream> #include <cstdio> #include <cstdlib> using namespace std; double exp() { char s[20]; cin >> s; 阅读全文
posted @ 2024-06-26 23:08 mcr130102 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 动态规划的优缺点是什么? 动态规划的优点是: 可以解决一些复杂的问题,例如背包问题、最长公共子序列问题等; 可以通过记忆化搜索来避免重复计算,提高效率; 可以通过状态转移方程来简化问题,使问题更易于理解和解决; 可以处理连续的问题,例如最大子段和问题。 动态规划的缺点是: 对于某些问题,动态规划的时 阅读全文
posted @ 2024-06-26 22:55 mcr130102 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 题目 P0646. [NOIP2016提高组] 换教室 思路 简单很难的D规划P 代码 #include<bits/stdc++.h> using namespace std; int dis[305][305]; constexpr int _SIZE = 2e3; int n, m, v, e; 阅读全文
posted @ 2024-06-25 20:52 mcr130102 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 题目 P0891. 四次方数 思路 简单的动态规划 代码 #include<cstdio> #include<algorithm> #include<cstring> using namespace std; int m; int v[19] = {1, 16, 81, 256, 625, 1296 阅读全文
posted @ 2024-06-24 20:40 mcr130102 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 题目 P0609. 质因分解加强版 思路 代码 #include <iostream> #include <vector> #include <string> std::string primeFactorization(int n) { std::vector<int> factors; std: 阅读全文
posted @ 2024-06-22 15:37 mcr130102 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 题目 kedaOJ#P2849时间涟漪 思路 栈 代码 #include<bits/stdc++.h> using namespace std; int main() { int N; cin >> N; stack<int> timeRipples; int maxEnergy = INT_MIN 阅读全文
posted @ 2024-06-22 14:34 mcr130102 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 题目 kedaOJ#P2708电动车骑行 思路 双指针,好像就是尺取法 代码 #include<bits/stdc++.h> using namespace std; int main() { int w, n; cin >> w >> n; vector<int> weights(n); for 阅读全文
posted @ 2024-06-22 14:31 mcr130102 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 题目 kedaOJ#P1530一起摇摆 思路 无 代码 #include<bits/stdc++.h> int main() { int n; std::cin >> n; std::vector<int> arr1(n); std::vector<int> arr2(n); for (int i 阅读全文
posted @ 2024-06-22 14:28 mcr130102 阅读(9) 评论(0) 推荐(0) 编辑
请不要抄袭任何人的博客,这是对一名开发者最基本的尊重。