Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
71753 孙诗皓 如何得到"hello" C++ Accepted 1 MS 276 KB 382 2024-04-27 16:16:32

Tests(20/20):


Code:

#include <iostream> #include <cmath> #include <cstring> using namespace std; int main() { char a[1501],b[5]={'h','e','l','l','o'}; cin>>a; int len=strlen(a),y=0; for(int i=0;i<len;i++) { if(a[i]==b[y]) { y++; } } if(y==5) cout<<"YES"; else cout<<"NO"; return 0; }