| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 74662 | 刘世杰 | 如何得到"hello" | C++ | Accepted | 1 MS | 276 KB | 474 | 2024-05-25 16:59:30 |
# include<iostream> # include<cstring> # include<cstdio> using namespace std; int main(){ /*char str1[51],str2[51]; cin >> str1 >> str2; int l=strlen(str1); for (int i=0;i<l;i++) { if(str1[i]==str2[i]){ cout<<1; }else{ cout<<0; } } */ char n[1501]; int m[5] = {'h','e','l','l','o'}; int x = 0; cin >> n; for(int i = 0;n[i] != '\0';i++){ if(n[i] == m[x]) x++; } if(x == 5) cout << "YES"; else cout << "NO"; return 0; }