题解列表

筛选

数据结构-快速排序

摘要:解题思路:注意事项:参考代码:                                                 #include<bits/stdc++.h>using namespa……

排序(超简单的sort排序)

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int arr[200000]={0};int main(){  int n; wh……

两种方法解决

摘要:解题思路:注意事项:参考代码:解法一:用公司算(吉姆拉尔森)#include<iostream>#include<string>using namespace std;string week[] = ……

1144: C语言训练-自守数问题

摘要:### 思路 1. 将一个int转换成一个char数组(倒序) 先获取int的长度len(几位数),然后给char数组分配len+1大小的空间(最后一位放'\0',自己的理解哈哈),从int的个……

编写题解 2833: 金币

摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include<math.h> int main() {    int a,sum = 0,m = 1;     int ……

详解,注释多,易理解

摘要:要注意转换的顺序,比如数据10 2 3 4 5 6 7 8 1 9,如果直接找到最大值最小值所在位置的下标,再互换会出错,所以我选择分先后转换,先转换最小值和第一个数字,再转换最大值和最后一个数字 ……