1644:最长字符串(使用结构体存储,扩展解法)
```cpp#include#include#includeusingnamespacestd;structword{stringw;intsize;};intmain(){wordwords[50];//声明一个包含50个word结构体的数组stringstr;getline(cin,
结构体数组解决(c语言代码)
```c#include#include#defineMAX101typedefstruct{//定义一个结构体chars[MAX];//字符数组,用于存储字符串intlength;//整数,存储字符串的长度}Arr;intmain(){Arrstr[MAX];//定义一个Arr类型的数组,
1644: 蓝桥杯算法训练VIP-最长字符串
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ string m……
1644: 蓝桥杯算法训练VIP-最长字符串
```cpp#includeusingnamespacestd;typedeflonglongll;intmain(){stringmaxxstr;llmaxx=0;for(inti=1;i>s;if(s.size()>maxx){maxx=s.size();maxxstr=s;}}cout
题解 1644: 蓝桥杯算法训练VIP-最长字符串
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int maxx1=0; string maxx; for……
最长字符串(c语言代码 简单易理解 有详细注释)
```c#include#includeintmain(){charstr[500]={0};//用来存放输入的字符串gets(str);inti=1;char*pstr[6];pstr[0]=strtok(str,"");//用来分解输入的字符串while(*(pstr+i-1))//strtok结
蓝桥杯算法训练VIP-最长字符串(C语言)
摘要:#include <stdio.h>
#include <string.h>
int main()
{
int i;
int n = 0;
char p[100] ……