#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
vector<string> vecwords;
char chin='1';
string strword;
while(1)
{
chin=getchar();
if(chin=='\n')
{
vecwords.push_back(strword);
break;
}
else if(chin!=','&&chin!=' ')
{
string strc(1,chin);
strword+=strc;
}
else
{
vecwords.push_back(strword);
strword="";
}
}
int ishortpos=0,ishortlen=vecwords[0].length();
int ilongpos=0,ilonglen=vecwords[0].length();
for(int i=1;i<vecwords.size();i++)
{
if(vecwords[i].length()==0)
continue;
if(vecwords[i].length()<ishortlen)
最长最短单词
最新推荐文章于 2025-03-02 17:29:22 发布