Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
121396 | 任艺宸 | 如何得到"hello" | C++ | Accepted | 1 MS | 288 KB | 543 | 2025-06-07 12:24:35 |
#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 a[10000]; char b[5]={'h','e','l','l','o'}; cin>>a; int l=0; for(int i=0;a[i]!='\0';++i) { if(a[i]==b[l]){ l++; } } if(l==5){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } return 0; }