python插入排序题解 题目有点问题,所以输出格式比较乱n=int(input())a=list(map(int,input().split()))A=[]#print(n)输出测试#print(a)输出测试foriinrange(n):print("Insertelement[%d]:"%(i+1))A.append(a[ 题解列表 2023年02月07日 0 点赞 0 评论 587 浏览 评分:0.0
3060: 合并石子 ###合并石子#######区间dp------------#####解题思路:------------f(i,j)表示将从第i堆石子到第j堆石子合并成一堆的最小花费。思考:特殊情时f(i,j)=?(i=j)答:f(i,j)=0。那对于一般情况呢?首先我们先举个栗子QAQf(1, 题解列表 2023年02月07日 0 点赞 0 评论 772 浏览 评分:9.9
去掉空格(超级容易理解的C语言版) 摘要:解题思路:输入多行带空格的可以用gets,遇到空格便把后面一个元素赋给当前空格,判断连续多个空格可以用while。注意事项:因为最后的字符串要加上'\0',所以循环变量定义在函数内而不…… 题解列表 2023年02月07日 0 点赞 0 评论 596 浏览 评分:0.0
2804: 与指定数字相同的数的个数 摘要:解题思路:注意事项:参考代码:a = 0n,m = map(int,input().split())l = list(map(int,input().split()))for i in l: i…… 题解列表 2023年02月07日 0 点赞 0 评论 644 浏览 评分:0.0
输出亲朋字符串(简短) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char s[100]; gets(s); int …… 题解列表 2023年02月07日 0 点赞 0 评论 567 浏览 评分:0.0
石头剪子布(利用strcmp函数) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>//建立结构体struct play{ char p1[100];//玩家1 char p2[100…… 题解列表 2023年02月07日 0 点赞 1 评论 947 浏览 评分:9.9
1000: [竞赛入门]简单的a+b 标题 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b; while(cin>>a>>b)cout…… 题解列表 2023年02月07日 0 点赞 0 评论 518 浏览 评分:9.9
2749: Hello, World!(C++代码) 摘要:解题思路:直接输出即可注意事项:1.用英语符号 2.逗号后面有一个空格 3.注意大小写参考代码:#include<iostream>using na…… 题解列表 2023年02月07日 0 点赞 0 评论 929 浏览 评分:9.9
2803: 整数的个数 摘要:解题思路:注意事项:参考代码:a1 = a5 = a10 = 0k = int(input())l = list(map(int,input().split()))for i in l: if …… 题解列表 2023年02月06日 0 点赞 0 评论 702 浏览 评分:9.9
2802: 满足条件的数累加 摘要:解题思路:注意事项:参考代码:s = 0m,n = map(int,input().split())for i in range(m,n+1): if i % 17 == 0: s…… 题解列表 2023年02月06日 0 点赞 0 评论 590 浏览 评分:0.0