这数据...

B2120 单词的长度

glass_goldfish @ 2024-10-05 17:26:39

我这个代码连样例都没过,咋就 AC 了!!
额...数据太水了...

#include<bits/stdc++.h>
#define int long long
#define INF 0x3f3f3f
using namespace std;
string s;
int ans;
signed main()
{
    getline(cin,s);
    for(int i=0;i<s.size();i++){
        if(s[i]==' ')cout<<ans<<",",ans=0;
        else ans++;
    }
    cout<<ans;
    return 0;
}

by UKE_bound @ 2024-10-05 17:28:44

qp


by glass_goldfish @ 2024-10-05 17:30:59

qp


by glass_goldfish @ 2024-10-05 17:31:18

@zhangjiaan 你没事qp干啥


by glass_goldfish @ 2024-10-05 17:31:37

@信息学奥赛一本通 @chen_zhe


by glass_goldfish @ 2024-10-05 17:45:48

请求置顶


|