Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
134914 王丞杰 如何得到"hello" C++ Runtime Error 1 MS 272 KB 266 2025-11-01 17:18:52

Tests(2/20):


Code:

#include<bits/stdc++.h> using namespace std; char s[50]; char a[60]="hello"; int main(){ int k=0; cin>>s; int n=strlen(s); for(int i=0;i<n;i++){ if(s[i]==a[k]){ k++; } if(k==5){ cout<<"YES"; return 0; } } if(k<5)cout<<"NO"; }


Run Info:

Runtime Error:Segmentation fault