首页 > 编程语言 > 详细

蓝桥杯 1536: [蓝桥杯][算法提高VIP]最长单词

时间:2020-02-10 16:37:09      阅读:79      评论:0      收藏:0      [点我收藏+]

基本思想:

没啥思想,弱智题;

 

关键点:

没关键点;

 

#include<iostream>
#include<stdlib.h>
#include<stdio.h>
#include<vector> 
#include<string>
#include<math.h>
#include<algorithm>
#include<cstring>
using namespace std;


int main(){
	string s;
	int size = 0;
	string t;
	while (cin >> s) {
		if (s.size() > size) {
			t = s;
			size = s.size();
		}
	}
	cout << t;
	return 0;
}

  

蓝桥杯 1536: [蓝桥杯][算法提高VIP]最长单词

原文:https://www.cnblogs.com/songlinxuan/p/12291206.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!