2798 整数序列的元素最大跨度值 摘要:解题思路:求整数序列的最大跨度值(最大值减去最小值)注意事项:最大值用 if(x > max),最小值用 if(x < min)最小值初始化为“很大”,最大值初始化为“很小”参考代码:#i…… 题解列表 2025年08月02日 0 点赞 0 评论 14 浏览 评分:0.0
2025/7/26刷题记录 摘要:解题思路:找最大值 初始值为限制内最小值 找最小值 初始值找限制内最大值注意事项:参考代码:#include<stdio.h>int main(){ &…… 题解列表 2025年07月26日 0 点赞 0 评论 28 浏览 评分:0.0
整数序列的元素最大跨度值 给定一个长度为n的非负整数序列,请计算序列的最大跨度值(最大跨度值 = 最大值减去最小值)。 摘要:解题思路:通过循环将数组赋值后,将a[0]赋值给max和min分别代表最大值和最小值,接着进行循环比较,从a[1]对比到a[n-1]。如果a[j]大于max,那就max更新为a[j]的值。相反,如果a…… 题解列表 2025年07月22日 0 点赞 0 评论 39 浏览 评分:0.0
题解 2798: 整数序列的元素最大跨度值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b[1000],max,min; scanf…… 题解列表 2025年01月25日 0 点赞 0 评论 187 浏览 评分:0.0
2798: 整数序列的元素最大跨度值题解 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n,maxx= -1e18 ,minn=1e…… 题解列表 2024年12月22日 3 点赞 0 评论 200 浏览 评分:10.0
编写题解 2798: 整数序列的元素最大跨度值 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ long long n,maxx=-1e18,minn…… 题解列表 2024年12月22日 0 点赞 0 评论 419 浏览 评分:0.0
2798: 整数序列的元素最大跨度值(详细注释) 摘要:解题思路:注意事项:参考代码://解题思路:最大跨度=最大值-最小值,因而只要求出最大值与最小值,此题就迎刃而解了。 #include <stdio.h> int main() { i…… 题解列表 2024年12月20日 2 点赞 0 评论 375 浏览 评分:0.0
送分了........ 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int max=0,min=1000,a,b; scanf("%d",&a); while(a…… 题解列表 2024年11月26日 0 点赞 0 评论 216 浏览 评分:0.0
元素最大跨度值 用到了max min for循环 摘要:解题思路:注意事项:题目描述给定一个长度为n的非负整数序列,请计算序列的最大跨度值(最大跨度值 = 最大值减去最小值)。输入格式一共2行,第一行为序列的个数n(1 <= n <= 1000),第二行为…… 题解列表 2024年11月04日 0 点赞 0 评论 173 浏览 评分:0.0
好理解的答案:关于函数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int max(int x , int y ){ int d; d=x>y?x:y ; return d ; }int min(…… 题解列表 2024年11月04日 0 点赞 0 评论 151 浏览 评分:0.0