比较繁琐的解法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int i,j,p=0; char a[150],b[150],…… 题解列表 2024年12月08日 0 点赞 0 评论 414 浏览 评分:0.0
1644:最长字符串(使用结构体存储,扩展解法) ```cpp#include#include#includeusingnamespacestd;structword{stringw;intsize;};intmain(){wordwords[50];//声明一个包含50个word结构体的数组stringstr;getline(cin, 题解列表 2024年10月04日 0 点赞 0 评论 479 浏览 评分:9.9
结构体数组解决(c语言代码) ```c#include#include#defineMAX101typedefstruct{//定义一个结构体chars[MAX];//字符数组,用于存储字符串intlength;//整数,存储字符串的长度}Arr;intmain(){Arrstr[MAX];//定义一个Arr类型的数组, 题解列表 2024年08月23日 0 点赞 0 评论 556 浏览 评分:0.0
1644: 蓝桥杯算法训练VIP-最长字符串 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ string m…… 题解列表 2024年07月13日 0 点赞 0 评论 491 浏览 评分:0.0
1644: 蓝桥杯算法训练VIP-最长字符串 ```cpp#includeusingnamespacestd;typedeflonglongll;intmain(){stringmaxxstr;llmaxx=0;for(inti=1;i>s;if(s.size()>maxx){maxx=s.size();maxxstr=s;}}cout 题解列表 2024年07月13日 0 点赞 0 评论 435 浏览 评分:0.0
题解 1644: 蓝桥杯算法训练VIP-最长字符串 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int maxx1=0; string maxx; for…… 题解列表 2024年07月13日 0 点赞 0 评论 538 浏览 评分:0.0
无聊的星期六 摘要:z=input() z=z.split() max=0 for i in range(len(z)): if len(z[max])<len(z[i]): max=i…… 题解列表 2024年04月14日 0 点赞 0 评论 589 浏览 评分:0.0
最长字符串(c语言代码 简单易理解 有详细注释) ```c#include#includeintmain(){charstr[500]={0};//用来存放输入的字符串gets(str);inti=1;char*pstr[6];pstr[0]=strtok(str,"");//用来分解输入的字符串while(*(pstr+i-1))//strtok结 题解列表 2023年04月21日 0 点赞 0 评论 771 浏览 评分:9.9
python最长字符串 带解析 s=list(input().split())#以列表方式存储Max=len(s[0])#记录字符串最大长度首先记录第一个n=[]#记录字符串最大长度对应字符的下标n.append(0)#首先记录第一个foriinrange(1,len(s)):ifMax 题解列表 2023年02月19日 0 点赞 0 评论 590 浏览 评分:9.9 蓝桥杯算法训练VIP-最长字符串(C语言) 摘要:#include <stdio.h> #include <string.h> int main() { int i; int n = 0; char p[100] …… 题解列表 2023年01月06日 0 点赞 0 评论 656 浏览 评分:0.0 « 1234567 »
蓝桥杯算法训练VIP-最长字符串(C语言) 摘要:#include <stdio.h> #include <string.h> int main() { int i; int n = 0; char p[100] …… 题解列表 2023年01月06日 0 点赞 0 评论 656 浏览 评分:0.0