非递归方法解决最长公共子序列 摘要:解题思路:使用二维数组来记录相等的情况,根据左边和上方的数字以及相等的情况来为二维数组赋值注意事项:起始项为【1,1】,所以要i-1,j-1;参考代码:#include <iostream>#incl…… 题解列表 2023年11月05日 0 点赞 0 评论 336 浏览 评分:9.9
c++ STL解法,用上vector容器 摘要:#include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { int…… 题解列表 2023年11月05日 0 点赞 0 评论 214 浏览 评分:8.0
新手简单快速解决!!! 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n = 0, x = 0, y = 0; cin …… 题解列表 2023年11月05日 0 点赞 0 评论 180 浏览 评分:0.0
2851: 合法C标识符 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;char s[1000],a[1000];int main(){ cin>>…… 题解列表 2023年11月04日 0 点赞 0 评论 259 浏览 评分:0.0
2946: 数制转换 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h> using namespace std; int bbb[20]; int main() { int …… 题解列表 2023年11月04日 0 点赞 0 评论 270 浏览 评分:9.9
2850: 输出亲朋字符串 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;char s[10000];int main(){ cin.getline(…… 题解列表 2023年11月04日 0 点赞 0 评论 248 浏览 评分:9.9
题解 2997: 梯形面积 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double e; e=150*2/15*(1…… 题解列表 2023年11月04日 0 点赞 0 评论 315 浏览 评分:9.9
题解 2767: 计算多项式的值 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double a,b,c,d,x,fx; ci…… 题解列表 2023年11月04日 0 点赞 0 评论 273 浏览 评分:9.9
题解 2766: 甲流疫情死亡率 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){ int a,b; cin>>…… 题解列表 2023年11月04日 1 点赞 0 评论 439 浏览 评分:9.9
3154 字符简写(新手上路,求大佬指正)(动态规划) 摘要:解题思路:对于输入的数据我们只需要辨别是否是字符c1和c2。对一个符合题目要求的子串来说,结尾一定是c2字符,开头为c1字符。因此只需要将每个c2字符前c1字符的个数相加即可。同时子串有长度n的限制,…… 题解列表 2023年11月03日 0 点赞 0 评论 383 浏览 评分:0.0