Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
63035 许铭锐 如何得到"hello" C++ Accepted 2 MS 272 KB 293 2023-12-31 14:50:53

Tests(20/20):


Code:

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