Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
134909 刘益梵 如何得到"hello" C++ Accepted 1 MS 268 KB 253 2025-11-01 17:14:00

Tests(20/20):


Code:

#include<bits/stdc++.h> using namespace std; char a[2000]; char b[5]={'h','e','l','l','o'}; int main(){ int box=0; cin>>a; for(int i=0;i<strlen(a);i++){ if(a[i]==b[box]) box++; } if(box>=5) cout<<"YES"; else cout<<"NO"; return 0; }