Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6289 柯宇希 如何得到"hello" C++ Accepted 0 MS 264 KB 499 2025-01-16 15:43:41

Tests(20/20):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ char s[1505],a[15]="hello"; cin>>s; int n=strlen(s),p=0; for(int i=0;i<n;i++){ if(s[i]==a[p]) p++; if(p==5){ cout<<"YES"; return 0; } } cout<<"NO"; return 0; }