简洁的方式找到最大值的下标(C语言) 摘要:解题思路: 简单遍历数组内元素然后找到最大值再输出下标注意事项:参考代码:#include<stdio.h> int main() { int a, b, c = 0; i…… 题解列表 2022年11月22日 0 点赞 0 评论 359 浏览 评分:0.0
c语言与c++结合-最大数位置 摘要:解题思路:注意事项:long long参考代码:#include<iostream>usingnamespacestd;intmain(){…… 题解列表 2025年04月20日 2 点赞 0 评论 414 浏览 评分:0.0
两种方法:递归函数 && 简单for循环 摘要:解题思路:注意事项:参考代码://递归函数#include<iostream>#include<vector>using namespace std ;long long ko…… 题解列表 2025年04月17日 0 点赞 0 评论 236 浏览 评分:0.0
一个有点复杂的方法,不如其他大佬的优质解法(本人刚起步学习哈) 摘要:#includeint main(void){ int num; scanf("%d",&num); int a[num]; for(int…… 题解列表 2025年02月17日 1 点赞 0 评论 442 浏览 评分:0.0
求最值索引,定指标max/j,在循环中不断替换 摘要:解题思路:求最值索引,定指标max/j,在循环中不断替换。输出记得索引+1。注意事项:参考代码:#include<iostream> using namespace std; int main()…… 题解列表 2024年12月10日 2 点赞 0 评论 358 浏览 评分:0.0
3020:最大位数 摘要:解题思路:注意事项:参考代码:n = int(input())list_ = list(map(int, input().strip().split()))m = max(list_)i = list…… 题解列表 2024年09月28日 0 点赞 0 评论 501 浏览 评分:0.0
编写题解 3020: 最大数位置 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){int n,max=0; cin>>n;int a[n];fo…… 题解列表 2024年06月11日 0 点赞 0 评论 478 浏览 评分:0.0
用输入数组方法简单易懂完成(c语言) 摘要:解题思路:先定义并用scanf输入多少个数 n接着定义数组并输入数组a[n+1]各个数再用替代的方法替代现有最大max#includeint main() { int i,n,t; …… 题解列表 2023年08月28日 0 点赞 0 评论 376 浏览 评分:0.0
题解 3020: 最大数位置 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ int n…… 题解列表 2024年05月05日 0 点赞 0 评论 326 浏览 评分:0.0
3020: 最大数位置 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define N 1001int main(){int a[N],max,p=0,n;a[0]=0;scanf("%d",&n);in…… 题解列表 2023年01月17日 0 点赞 0 评论 307 浏览 评分:0.0