Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
134915 王丞杰 如何得到"hello" C++ Accepted 2 MS 272 KB 268 2025-11-01 17:19:27

Tests(20/20):


Code:

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