Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
62442 刘宇轩 如何得到"hello" C++ Wrong Answer 1 MS 276 KB 491 2023-12-23 17:36:47

Tests(0/20):


Code:

#include<iostream> # include<cstring> using namespace std; int main(){ char a[1500],b[1500],d[5]; cin>>a; int c=strlen(a); int n; for(int i=0;i<c;i++){ if(a[i]=='h'){ d[1]='h'; } if(a[i]=='e'){ d[2]='e'; } if(a[i]=='l'){ d[3]='l'; } if(a[i]=='l'){ d[4]='l'; } if(a[i]=='o'){ d[5]='o'; } } if(d[1]=='h'&&d[2]=='e'&&d[3]=='l'&&d[4]=='l'&&d[5]=='o'){ cout<<"YES"; } else{ cout<<"NO"; } return 0; }


Run Info:

------Input------
jkwgburltxdezgcdhduwcpqoadrwnqljfn
------Answer-----
NO
------Your output-----
YES