| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 62991 | 李琥博 | 如何得到"hello" | C++ | Accepted | 1 MS | 272 KB | 393 | 2023-12-31 10:26:26 |
#include<bits/stdc++.h> using namespace std; int main() { int h=0,e=0,l=0,o=0; char s[1501]; cin>>s; int ls=strlen(s); for(int i=0;i<ls;i++){ if(s[i]=='h'){ h++; } if(s[i]=='e'&&h>0){ e++; } if(s[i]=='l'&&e>0){ l++; } if(s[i]=='o'&&l>1){ o++; } } if(h>0&&e>0&&l>1&&o>0){ cout<<"YES"; }else{ cout<<"NO"; } return 0; }