Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
81744 刘昊炜 如何得到"hello" C++ Accepted 1 MS 276 KB 408 2024-07-12 15:20:34

Tests(20/20):


Code:

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