Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
88760 杨一诺 如何得到"hello" C++ Wrong Answer 1 MS 268 KB 406 2024-08-21 11:17:26

Tests(0/20):


Code:

#include<bits/stdc++.h> using namespace std; char a[1500]; int h=0,e=0,l1=0,l2=0,o=0; int main(){ cin>>a; for(int i=0;i<=1500;i++){ if(a[i]=='h'){ h=1; } if(a[i]=='e'&&h==1){ e=1; } if(a[i]=='l'&&e==1){ l1=1; } if(a[i]=='l'&&l1==1){ l2=1; } if(a[i]=='o'&&l2==1){ o=1; } } if(o=1){ cout<<"YES"; } else{ cout<<"NO"; } return 0; }


Run Info:

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