| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 62744 | 夏轩淇 | 如何得到"hello" | C++ | Wrong Answer | 1 MS | 276 KB | 410 | 2023-12-28 18:13:09 |
#include<bits/stdc++.h> using namespace std; int main(){ char a[1501]; cin>>a; int h=0; int e=0; int l=0; int o=0; int la=strlen(a); for(int i=0;i<la;i++){ if(a[i]=='h'){ h++; } if(a[i]=='e'&&h>0){ e++; } if(a[i]=='l'&&e>0){ l++; } if(a[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