优质题解 1207: 字符排列问题 C++ STL容器 深度优先搜索DFS 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; map<char,int>m; //对排列中的字符进行查重 …… 题解列表 2022年03月14日 0 点赞 0 评论 695 浏览 评分:9.9
题解 1924: 蓝桥杯算法提高VIP-01背包 摘要:解题思路: dp[i][j]表示面对第 i 个物品时,最大重量 j 的背包所拥有的最大价值打表,找出状态转移方程:if(j<w[i]){ //不拿 dp[i][j]=dp[i-1][j]; …… 题解列表 2022年03月14日 0 点赞 0 评论 832 浏览 评分: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 评论 344 浏览 评分:0.0
清晰明了简洁版代码 摘要:解题思路:注意事项:参考代码:n = int(input())s = ''for i in range(n): a = s s += chr(ord('A'…… 题解列表 2022年03月14日 0 点赞 0 评论 336 浏览 评分:9.9
[STL训练]A+B Python------十二 摘要:解题思路:用while循环,可不受组数限制。注意事项:引用try......except......进行取数,不受组数限制(防止测试时组数与题干数不同)参考代码:while True: tr…… 题解列表 2022年03月14日 0 点赞 0 评论 435 浏览 评分:9.9
双指针o(n)!! 摘要:```cpp #include using namespace std; int main(){ string s1; getline(cin, s1); int max_…… 题解列表 2022年03月14日 0 点赞 0 评论 516 浏览 评分:9.9
c++特性解决问题 摘要:```cpp #include using namespace std; int main(){ int max_len = -1, index = 0; vectors; …… 题解列表 2022年03月14日 0 点赞 0 评论 381 浏览 评分:0.0
模拟,一道水题 摘要:```cpp #include using namespace std; int main(){ string s1, s2; cin >> s1 >> s2; int le…… 题解列表 2022年03月14日 0 点赞 1 评论 487 浏览 评分:9.9
编写题解 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 评论 407 浏览 评分:0.0
编写题解 1019: [编程入门]自由下落的距离计算(入门版,没有函数) 摘要:解题思路:次数落地后的路程S反弹点H1S(1)=MH(1)=M/22S(2)=M+M/2+M/2=S(1)+2*H(1)H(2)=(M/2)/2=M/22=H(1)/23S(3)=S(2)+2*H(2…… 题解列表 2022年03月14日 0 点赞 1 评论 753 浏览 评分:9.9