1536: 蓝桥杯算法提高VIP-最长单词 摘要:#include<stdio.h>#include<string.h>#define N 200000char s[N];int main(){ in…… 题解列表 2025年12月10日 0 点赞 0 评论 333 浏览 评分:0.0
编写题解 1536: 蓝桥杯算法提高VIP-最长单词 摘要:解题思路:注意事项:按空格分割为多个字符串,在比较每个字符串的长度。参考代码:#include<stdio.h>#include<string.h>void max(char* p, char sz[…… 题解列表 2024年03月30日 0 点赞 0 评论 912 浏览 评分:0.0
蓝桥杯算法提高VIP-最长单词-题解(C语言代码) 十分简洁和易懂 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char s[100000]; int maxn=0; c…… 题解列表 2021年02月18日 0 点赞 0 评论 737 浏览 评分:0.0
蓝桥杯算法提高VIP-最长单词-题解(C语言代码) #include#include#includeintmain(){inti,max,maxposi,c,state=0;chars[100001];gets(s);for(i=0,c=0;imax){maxposi=i-c;max=c;}}c=0;}elsec++;}for(i=maxposi;s[ 题解列表 2021年02月16日 0 点赞 0 评论 651 浏览 评分:0.0
蓝桥杯算法提高VIP-最长单词-题解(C语言代码) 摘要:#include<stdio.h>#include<string.h>int main(){ char a[100000]; int n,i,j,max=0,count=0; gets(a); n=s…… 题解列表 2020年12月05日 0 点赞 0 评论 1192 浏览 评分:9.3
蓝桥杯算法提高VIP-最长单词-题解(C语言代码)15行 摘要:解题思路:具体看注释注意事项:无参考代码:#include <stdio.h> #include <string.h> int main(){ char str1[100005], st…… 题解列表 2020年08月17日 0 点赞 0 评论 969 浏览 评分:0.0
蓝桥杯算法提高VIP-最长单词-题解(C语言代码) ##解题思路:输入字符串,求最长的一个单词,并输出这个单词,中间空格间隔,可通过scanf底层的性质,遇到空格或回车停止来获取字符串,找出输出的最长字符串,进行输出。##注意事项:申请两个数组,通过输入字符存在来控制循环的存在性,最后输出最长的字符。 题解列表 2020年07月14日 0 点赞 0 评论 1292 浏览 评分:9.0
蓝桥杯算法提高VIP-最长单词-题解(C语言代码) #include#includeintmain(void){charstr[100001],s[100001];intmax=0,len=0;while(EOF!=scanf("%s",s)){len=strlen(s);if(len>max){max=len;strcpy(str, 题解列表 2020年03月20日 0 点赞 0 评论 1284 浏览 评分:0.0
蓝桥杯算法提高VIP-最长单词-题解(C语言代码) 摘要: int main() { char s[100000]; gets(s);//输入带空格的字符串 int lens=strlen(s); //printf("%d"…… 题解列表 2020年03月20日 0 点赞 0 评论 1029 浏览 评分:0.0
蓝桥杯算法提高VIP-最长单词-题解(C语言代码) 两次循环即可#include#includeintmain(){inti=0,sum=0,max=0;chara[10000][01000],*q;while(scanf("%s",&a[i++])!=EOF){sum++;}for(i=0;imax){max=strlen(a[i]);q=a[i]; 题解列表 2020年02月13日 0 点赞 0 评论 1010 浏览 评分:0.0