题解列表

筛选

三个字符串的排序【题解】(冒泡排序和选择排序)

摘要:解题思路:        冒泡排序和选择排序在排序问题里是两种比较简单常用的方法。先讲下两种排序方法的实现过程,这两种排序方法是如何完成排序的。都以从小到大升序举例。                冒……

【C++较复杂版解法】

摘要:#include <iostream> using namespace std; int main() {  int N,sum=0,list[100];  while(cin>>N&&N!……

题目 1205: 字符串的修改

摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<string.h> int main() {     char a[201],b[201];     in……

蓝桥杯算法训练VIP-矩阵加法 (python)

摘要:解题思路:这个网站对写python的太不友好了,都没有答案,还得自己写,哭了哭了注意事项:参考代码:N,M = map(int,input().split())l = []l2 = []for i i……

明明的随机数-python简单解决

摘要:1、用map()高阶函数解决输入问题; 2、使用集合特性去重; 3、列表函数直接排序; ```python n = int(input()) l = set(map(int, input()……

数组的距离

摘要: ```python from math import fabs a, b = input().split() l1 = list(map(int,input().split())) l……

1974: A+B+C+D(C语言)动态规划

摘要:解题思路:看到这道题第一反应就是深度优先搜索,提交后超时void dfs(int target, int pos, int *cnt) {     if (pos == 3) {         ……

排序方法找最值

摘要:解题思路:先将第一个数当做最大值存起来,再遍历数组,每出现比之前存起来的数更大的就更换一次最大值注意事项:最后输出下标要减一参考代码:#include <stdio.h>#include <stdli……

简单的代码

摘要:解题思路:用一个for循环总起,再接两个分支,分别对正负数进行操作注意事项:参考代码:#include <stdio.h>#include <stdlib.h>int main(){   int a[……