电子爱好者的C语言算法 解题思路:注意事项:参考代码:#include#includeintmain(){inti,n,max=0,num[1000],length=1,len[1000]={0};scanf("%d",&n);for(i=0;i 题解列表 2025年11月03日 0 点赞 0 评论 309 浏览 评分:0.0 最长平台---C++的一些思路分享 解题思路:首先是创建一个可变数组可以进行输入元素,然后进入SqLongestList函数,负责找到最大的连续数。其内部实现最主要的就是两个指针,一个start作为标记指针,一个move作为移动指针。start负责标记数组初始位置,move指针从start指针位置开始出发并比较, 题解列表 2025年09月04日 1 点赞 0 评论 558 浏览 评分:0.0 C++:两种方法:递归函数 && 简单for循环 解题思路:注意事项:参考代码://递归函数#include#includeusingnamespacestd;voidko(vectorv,int&m,int&mlen,int&len,intl){if(l==0){if(len>mlen){mlen=le 题解列表 2025年04月17日 0 点赞 0 评论 416 浏览 评分:0.0 另外一道相同原理https://www.dotcpp.com/oj/problem2814.html 摘要:解题思路:开辟一个动态变量注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d", &n); int arr[n]; …… 题解列表 2024年12月19日 0 点赞 0 评论 348 浏览 评分:0.0 java 编写题解 2912: 最长平台 递归 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] args…… 题解列表 2024年01月10日 0 点赞 0 评论 608 浏览 评分:0.0 题解 2912: 最长平台 摘要: #include using namespace std; int a[20000],c,d,n; int main() { cin>>n; …… 题解列表 2023年12月13日 0 点赞 0 评论 531 浏览 评分:0.0 最长平台(再建一个数组存各连续平台长度) 摘要:参考代码: ```c #include int main() { int n; scanf("%d",&n); int a[n]; int b[n];//存连续平台长度 i…… 题解列表 2023年11月02日 0 点赞 0 评论 596 浏览 评分:0.0 2912: 最长平台(C语言) 摘要: #include int main() { int n; scanf("%d",&n); int a[n]; for(int i=0;imax_length) …… 题解列表 2023年07月27日 0 点赞 0 评论 595 浏览 评分:0.0 最长平台(C++)简单又实用 摘要:参考代码:#include <iostream>#include <vector>using namespace std;int main() { int n; cin >> n; //…… 题解列表 2023年07月19日 0 点赞 1 评论 637 浏览 评分:9.0 c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>int main(){ int n, * a,i,plateau_length=1,max_p…… 题解列表 2023年06月11日 0 点赞 0 评论 545 浏览 评分:0.0 « 12 »
最长平台---C++的一些思路分享 解题思路:首先是创建一个可变数组可以进行输入元素,然后进入SqLongestList函数,负责找到最大的连续数。其内部实现最主要的就是两个指针,一个start作为标记指针,一个move作为移动指针。start负责标记数组初始位置,move指针从start指针位置开始出发并比较, 题解列表 2025年09月04日 1 点赞 0 评论 558 浏览 评分:0.0
C++:两种方法:递归函数 && 简单for循环 解题思路:注意事项:参考代码://递归函数#include#includeusingnamespacestd;voidko(vectorv,int&m,int&mlen,int&len,intl){if(l==0){if(len>mlen){mlen=le 题解列表 2025年04月17日 0 点赞 0 评论 416 浏览 评分:0.0
另外一道相同原理https://www.dotcpp.com/oj/problem2814.html 摘要:解题思路:开辟一个动态变量注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d", &n); int arr[n]; …… 题解列表 2024年12月19日 0 点赞 0 评论 348 浏览 评分:0.0
java 编写题解 2912: 最长平台 递归 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] args…… 题解列表 2024年01月10日 0 点赞 0 评论 608 浏览 评分:0.0
题解 2912: 最长平台 摘要: #include using namespace std; int a[20000],c,d,n; int main() { cin>>n; …… 题解列表 2023年12月13日 0 点赞 0 评论 531 浏览 评分:0.0
最长平台(再建一个数组存各连续平台长度) 摘要:参考代码: ```c #include int main() { int n; scanf("%d",&n); int a[n]; int b[n];//存连续平台长度 i…… 题解列表 2023年11月02日 0 点赞 0 评论 596 浏览 评分:0.0
2912: 最长平台(C语言) 摘要: #include int main() { int n; scanf("%d",&n); int a[n]; for(int i=0;imax_length) …… 题解列表 2023年07月27日 0 点赞 0 评论 595 浏览 评分:0.0
最长平台(C++)简单又实用 摘要:参考代码:#include <iostream>#include <vector>using namespace std;int main() { int n; cin >> n; //…… 题解列表 2023年07月19日 0 点赞 1 评论 637 浏览 评分:9.0
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>int main(){ int n, * a,i,plateau_length=1,max_p…… 题解列表 2023年06月11日 0 点赞 0 评论 545 浏览 评分:0.0