Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
82663 张黄源 如何得到"hello" C++ Accepted 0 MS 276 KB 284 2024-07-13 14:32:01

Tests(20/20):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ string s; string a="hello"; int c=0; int k=0; cin>>s; for(int i=0;i<s.size();i++){ if(s[i]==a[k]){ k++; c++; if(c==5){ cout<<"YES"; return 0; } } } cout<<"NO"; return 0; }