Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
111327 | 刘佳宇 | 如何得到"hello" | C++ | Accepted | 1 MS | 280 KB | 330 | 2025-03-01 11:51:56 |
#include<bits/stdc++.h> using namespace std; int main() { string a; string b="hello"; cin>>a; int i=0; int c=a.size(); for(int j=0;j<c;j++){ if(a[j]==b[i]){ i++; } if(i==5){ break; } } if(i==5){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } return 0; }