Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
100655 | 郝王骏程 | 如何得到"hello" | C++ | Accepted | 1 MS | 276 KB | 377 | 2024-12-09 20:14:59 |
#include<iostream> // cin\cout\endl #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() using namespace std; int main(){ char a[1500],b[6]="hello"; cin>>a; int s=0; for(int i=0;a[i]!='\0';i++){ if(a[i]==b[s]) s+=1; } if(s==5){ cout<<"YES";} else cout<<"NO"; return 0; }