Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
62448 石茂诤 如何得到"hello" C++ Runtime Error 1 MS 276 KB 329 2023-12-23 17:47:27

Tests(1/20):


Code:

# include<cstring> //字符串头文件 # include<iostream> using namespace std; int main(){ char a[200]; cin>>a; int c=0; char b[]={'h','e','l','l','o'}; int am=strlen(a); for(int i=0;i<am;i++){ if(a[i]==b[c]){ c++; } } if(c==5){ cout<<"YES"; } else{ cout<<"NO"; } return 0; }


Run Info:

*** stack smashing detected ***: ./Main terminated