Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
7615 詹梓涵 如何得到"hello" C++ Accepted 0 MS 268 KB 359 2025-05-10 09:02:45

Tests(20/20):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char a[1501]={},b[6]={'h','e','l','l','o'}; cin>>a; int i=0,j=0; while(a[i]!='\0'){ if(a[i]==b[j]){ j++; } i++; } if(j==5){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } return 0; }