| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 63036 | 段文昊 | 如何得到"hello" | C++ | Wrong Answer | 2 MS | 284 KB | 400 | 2023-12-31 16:19:11 |
#include<bits/stdc++.h> using namespace std; int main(){ int h=0,e=0,l=0,o=0; char s[1501]; cin>>s; int n=strlen(s); for(int i=0;i<n;i++){ if(s[i]=='h'){ h++; } if(s[i]=='e' && h>0){ e++; } if(s[i]=='l' && e>0){ l++; } if(s[i]=='o' && h>1){ o++; } } if(h>0 && e>0 && l>1 && o>0){ cout<<"YES"; }else{ cout<<"NO"; } return 0; }
------Input------
scxiguigjtfskvmvmhoivnfisvvvvodgdrlgilljvokzhtlzhgpnzbgtcpnwqzgyckyahopfdfzijcstrtqonihvaohyqxpjnoqjzqouitrdtvcaekvtpuajbtixugidqfujzhnybbwpiehvoejnpzfjjbffhkjibfeyjrmztlvyiaupyubgcyctovnoyufisfsicpgvlhrkxwaptzzffvzryggmvkgpwu
------Answer-----
NO
------Your output-----
YES