编写题解 2056: 汉诺塔 利用栈和递归解决 摘要:#include <iostream>#include <stack>using namespace std;stack<int> s[3];void move(int x, int y,int n)…… 题解列表 2022年03月14日 0 点赞 0 评论 466 浏览 评分:0.0
模拟,一道水题 摘要:```cpp #include using namespace std; int main(){ string s1, s2; cin >> s1 >> s2; int le…… 题解列表 2022年03月14日 0 点赞 1 评论 537 浏览 评分:9.9
c++特性解决问题 摘要:```cpp #include using namespace std; int main(){ int max_len = -1, index = 0; vectors; …… 题解列表 2022年03月14日 0 点赞 0 评论 457 浏览 评分:0.0
双指针o(n)!! 摘要:```cpp #include using namespace std; int main(){ string s1; getline(cin, s1); int max_…… 题解列表 2022年03月14日 0 点赞 0 评论 602 浏览 评分:9.9
[STL训练]A+B Python------十二 摘要:解题思路:用while循环,可不受组数限制。注意事项:引用try......except......进行取数,不受组数限制(防止测试时组数与题干数不同)参考代码:while True: tr…… 题解列表 2022年03月14日 0 点赞 0 评论 579 浏览 评分:9.9
清晰明了简洁版代码 摘要:解题思路:注意事项:参考代码:n = int(input())s = ''for i in range(n): a = s s += chr(ord('A'…… 题解列表 2022年03月14日 0 点赞 0 评论 413 浏览 评分:9.9
编写题解 1018: [编程入门]有规律的数列求和 摘要:解题思路:有一分数序列: 2/1 3/2 5/3 8/5 13/8 21/13...... 求出这个数列的前N项之和,保留两位小数。方法一:如果把数列规律认为a/b=2/1;c/d=3/2;m=a+c…… 题解列表 2022年03月14日 0 点赞 0 评论 403 浏览 评分:0.0
题解 1924: 蓝桥杯算法提高VIP-01背包 摘要:解题思路: dp[i][j]表示面对第 i 个物品时,最大重量 j 的背包所拥有的最大价值打表,找出状态转移方程:if(j<w[i]){ //不拿 dp[i][j]=dp[i-1][j]; …… 题解列表 2022年03月14日 0 点赞 0 评论 902 浏览 评分:9.9
优质题解 1207: 字符排列问题 C++ STL容器 深度优先搜索DFS 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; map<char,int>m; //对排列中的字符进行查重 …… 题解列表 2022年03月14日 0 点赞 0 评论 809 浏览 评分:9.9
1514: 蓝桥杯算法提高VIP-夺宝奇兵 摘要:解题思路:这道题有点奇怪,有些条件没有说清楚,这里题人不能往右走,切只能往上走或者走左上角,既然这样就直接dp注意事项:当i==j的时候不能往上走,如果没有限制的话会超时参考代码:#include<b…… 题解列表 2022年03月14日 0 点赞 0 评论 687 浏览 评分:0.0