Run ID:125046
提交时间:2025-07-13 10:46:20
#include<iostream> #include<cstring> using namespace std; char a[1500]; char b[10]="hello"; int main(){ //strcpy( , ) 将字符数组~复值给~ //strcat( , ) 字符数组拼接 //strcmp(a,b) a>b cout<<"1" a==b cout<<"0" a<b cout<<"-1"; int k=0; cin>>a; int len=strlen(a); for(int i=0;i<len;i++){ if(a[i]==b[k]){ k++; } } if(k>4){ cout<<"YES"; }else{ cout<<"NO"; } return 0; }