Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
78904 刘济玮 如何得到"hello" C++ Wrong Answer 1 MS 268 KB 417 2024-06-29 12:17:34

Tests(0/20):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char s[1501]; scanf("%s",s); int len = strlen(s); int h=0,e=0,l=0,o=0; for(int i=0;i<len;i++){ if(s[i]=='h'){ h++; }else if(s[i]=='e'&&'h'>=1){ e++; }else if(s[i]=='l'&&'e'>=1){ l++; }else if(s[i]=='o'&&'l'>=2){ o++; } } if(h>=1&&e>=1&&l>=2&&o>=1){ cout<<"YES"; }else{ cout<<"NO"; } return 0; }


Run Info:

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