Python求解背包问题 摘要:解题思路:注意事项:参考代码:n,m=map(int,input().split())w=[0]*(n+1)v=[0]*(n+1)for i in range(1,n+1): w[i],v[i]…… 题解列表 2023年02月14日 0 点赞 0 评论 405 浏览 评分:0.0
字符串逆序输出(C语言) 摘要:两种方法: 法一:字符串数组 冒泡排序法 #include<stdio.h> #include<stdlib.h> void sort_bubble(char arr[], int len) …… 题解列表 2023年02月14日 0 点赞 0 评论 265 浏览 评分:0.0
编写题解 1010: [编程入门]利润计算 摘要:解题思路:注意事项:参考代码:I=int(input())if 0<I<=100000: j=I*0.1elif 100000<I<=200000: j=100000*0.1+(I-100…… 题解列表 2023年02月14日 0 点赞 0 评论 796 浏览 评分:0.0
Python解决-动态规划 摘要:解题思路:注意事项:参考代码:V = int(input())n = int(input())dp = [0]*(V+1)c = [0]*(n+1)for i in range(1, n+1): …… 题解列表 2023年02月14日 0 点赞 0 评论 398 浏览 评分:0.0
2852: 配对碱基链 水题解 摘要:解题思路: A变T, C变G注意事项:参考代码:#include <iostream> // #include <sstream> // #include <cstdio> // #includ…… 题解列表 2023年02月14日 0 点赞 0 评论 564 浏览 评分:0.0
编写题解 1477: 字符串输入输出函数 摘要:编写题解 1477: 字符串输入输出函数 ``` #include using namespace std; int main() { string s1,s2; cin>>s1>>…… 题解列表 2023年02月15日 0 点赞 0 评论 455 浏览 评分:0.0
编写题解 1687: 数据结构-字符串连接 摘要:编写题解 1687: 数据结构-字符串连接 ``` #include using namespace std; int main() { string s1,s2; for(int …… 题解列表 2023年02月15日 0 点赞 0 评论 497 浏览 评分:0.0
C语言训练-斐波纳契数列(简短版) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,i,a[40]; scanf("%d",&n); a[0]=0; a[1]=…… 题解列表 2023年02月15日 0 点赞 0 评论 375 浏览 评分:0.0
<循环> 求1+2+3+...+n的值(C语言) 摘要:#include<stdio.h> int main() { long long n,s=0; scanf("%lld", &n); for(int i=1;i<=n;i++) …… 题解列表 2023年02月15日 0 点赞 0 评论 344 浏览 评分:0.0
斐波纳契数列(C语言) 摘要:#include<stdio.h> int main() { int fib[40] = { 1,1 }; int N; scanf("%d", &N); for (int i =…… 题解列表 2023年02月15日 0 点赞 0 评论 297 浏览 评分:0.0