Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
88768 | 陈昊然 | 如何得到"hello" | C++ | Accepted | 1 MS | 268 KB | 401 | 2024-08-21 11:30:13 |
#include<bits/stdc++.h> using namespace std; char a[1501],d[1501]; int h,e,l,o; int main(){ cin>>a; int n=strlen(a); for(int i=0;i<=n-1;i++){ if(a[i]=='h'){ h++; } if(a[i] == 'e'&&h>=1){ e++; } if(a[i] == 'l'&&e>=1){ l++; } if(a[i] == 'l'&&l>1){ l++; } if(a[i] == 'o'&&l>=2){ cout<<"YES"; return 0; } } cout<<"NO"; return 0; }