Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
2728 | 孙浚轩 | 如何得到"hello" | C++ | Accepted | 0 MS | 264 KB | 328 | 2024-01-21 00:34:19 |
#include<iostream> using namespace std; int main(){ char a[1500],hello[5]={'h','e','l','l','o'}; cin>>a; int i,j=0; for(i=0;i<5;i++){ while(a[j]!=hello[i]){ if(a[j]=='\0'){ cout<<"NO"; return 0; } j++; } j++; } cout<<"YES"; return 0; }