yigu2468
yigu2468
全部文章
分类
归档
标签
去牛客网
登录
/
注册
yigu2468的博客
全部文章
(共47篇)
题解 | #密码验证合格程序#
#include <iostream> #include <map> using namespace std; int main(){ string str; while (cin>>str){ map<string,in...
2024-03-20
0
161
题解 | #密码截取#
#include <iostream> #include <vector> using namespace std; /** * dp[j][i]表示从j到i的子串是否是回文子串 */ int maxduichenLen(string str) { int n...
2024-03-20
0
175
题解 | #公共子串计算#
#include <iostream> using namespace std; int dp[200][200]; /** * dp[i][j]表示str1中以第i-1个字符为末尾的子串和str2中以第j-1个字符为末尾的子串的公共子串长度 * dp[0][j] = 0,dp...
2024-03-20
0
191
题解 | #放苹果#
#include <iostream> using namespace std; int dp[11][11]; /** * 递归 * m为0,一种;m为1两种;n为0一种;n为1两种 */ int fio(int m,int n){ if (m<=1 || n...
2024-03-20
0
212
题解 | #计算字符串的编辑距离#
#include <iostream> using namespace std; int dp[1001][1001]; /** * Levenshtein 距离,又称编辑距离,指的是两个字符串之间,由一个转换成另一个所需的最少编辑操作次数。 * 将一个字符替换成另一个字符,插...
2024-03-20
0
196
题解 | #输出单向链表中倒数第k个结点#
#include <cstddef> #include <iostream> using namespace std; struct ListNode{ int m_nKey; ListNode* m_pNext; }; int main() { ...
2024-03-19
0
192
题解 | #单词倒排#
#include <iostream> using namespace std; bool is_char(int c) { if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z...
2024-03-19
0
183
题解 | #汽水瓶#
#include <iostream> using namespace std; int qishui(int n){ if (n==1){ return 0; } else if(n==2){ return 1; } else{...
2024-03-19
0
160
题解 | #简单密码#
#include <iostream> #include <ostream> using namespace std; string encry(string str){ string ming = "ABCDEFGHIJKLMNOPQRSTUVWXYZa...
2024-03-19
0
222
题解 | #成绩排序#
#include <iostream> #include <queue> #include <algorithm> using namespace std; struct student{ string name; int score; ...
2024-03-18
0
227
首页
上一页
1
2
3
4
5
下一页
末页