Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
7616 | 刘芃伽 | 如何得到"hello" | C++ | Accepted | 0 MS | 256 KB | 342 | 2025-05-10 09:05:09 |
#include<bits/stdc++.h> using namespace std; int main(){ char a1[1501]={},a2[10]="hello"; cin>>a1; int q=0; for(int i=0;a1[i]!='\0';i++){ if(a1[i]==a2[q]) q++; if(q==5){ cout<<"YES"<<endl; return 0; } } if(q<5){ cout<<"NO"; } return 0; }