Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
6292 | 黄宜洋 | 如何得到"hello" | C++ | Accepted | 0 MS | 272 KB | 534 | 2025-01-16 15:48:53 |
#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 n[1501],b[10]="hello"; cin>>n; int a=strlen(n),c=0; for(int i=0;i<a;i++){ if(n[i]==b[c]){ c++; } if(c==5){ printf("YES"); return 0; } } printf("NO"); return 0; }