Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
134913 田祥江 如何得到"hello" C++ Runtime Error 1 MS 280 KB 345 2025-11-01 17:18:07

Tests(2/20):


Code:

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


Run Info:

Runtime Error:Segmentation fault