Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
3777 邓小龙 如何得到"hello" C++ Accepted 0 MS 268 KB 328 2024-07-03 12:08:57

Tests(20/20):


Code:

#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; }