2905: 最大值和最小值的差 摘要:```cpp #include using namespace std; int main() { int M,max=-10001,min=10001,x; cin>>M…… 题解列表 2022年11月30日 0 点赞 0 评论 496 浏览 评分:9.9
最大值和最小值的差 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int max,min,i,M,a[10000]; scanf("%d",&M); for(i=0;i<M;i+…… 题解列表 2022年11月22日 0 点赞 0 评论 469 浏览 评分:7.0
两种解法(sort和快速排序) 摘要:解题思路:第一种是利用c++内置函数sort,第二种是利用快速排序.(建议掌握第二种)注意事项:参考代码:第一种:第二种:#include<bits/stdc++.h> using namespac…… 题解列表 2022年11月04日 0 点赞 0 评论 311 浏览 评分:0.0
2905: 最大值和最小值的差(max_element) 摘要:解题思路:一个最简单的思路,把输入的数扫描一遍,找到最大值和最小值,相减即可。需要注意将两个变量初始化。参考代码:#include<iostream> #include<set> using na…… 题解列表 2022年09月14日 1 点赞 0 评论 1042 浏览 评分:9.9