缘珩369
缘珩369
全部文章
分类
归档
标签
去牛客网
登录
/
注册
缘珩369的博客
全部文章
(共4篇)
题解 | 硬币凑钱
每一个状态,可以由dp[i-1] 和 dp[i-5] 和 dp[i-7]这三种状态 +1 转移过来分别枚举三种状态取最小值答案即为最优解 #include<bits/stdc++.h> #define int long long using namespace std; co...
2025-08-08
1
33
题解 | 小红书推荐系统
#include<bits/stdc++.h> #define int long long #define s second #define f first using namespace std; const int N = 1e5+10; const int M = 1e9+7;...
2025-07-23
1
41
题解 | 无限长正整数排列字符串
#include<bits/stdc++.h> #define int long long using namespace std; const int N = 1e5+10; const int M = 1e9+7; //下面这个函数为有效代码 void solve() {...
2025-07-23
1
27
题解 | 凯撒加密
题目回顾旺仔哥哥忘记了登录密码,但他记得密码是通过将原文字符串 s 中的每个小写字母向后错位 n 次得到的。字母 z 向后错位一次会变成 a,以此类推循环。给定错位次数 n 和原文字符串 s,要求计算出最终的密码字符串。解题思路字母循环移位:小写字母共有 26 个,从 'a' 到 'z'。当...
2025-07-23
1
43