Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
160111 邹金行 如何得到"hello" C++ Accepted 1 MS 284 KB 298 2026-09-12 15:03:02

Tests(20/20):


Code:

#include<bits/stdc++.h> using namespace std; string s1,s2="hello"; int main() { cin>>s1; int len=s1.size(); int j=0; for(int i=0;i<=len-1;i++){ if(s1[i]==s2[j]){ j++; if(j==5){ break; } } } if(j==5){ cout<<"YES"; }else{ cout<<"NO"; } return 0; }