Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
88766 | 陈昊然 | 如何得到"hello" | C++ | Wrong Answer | 1 MS | 276 KB | 402 | 2024-08-21 11:25:56 |
#include<bits/stdc++.h> using namespace std; char a[1501],d[1501]; int h,e,l,o; int main(){ cin>>a; int n=strlen(a); for(int i=0;i<=n-1;i++){ if(a[i]=='h'){ h++; } if(a[i] == 'e'&&h>=1){ e++; } if(a[i] == 'l'&&e>=1){ l++; } if(a[i] == 'l'&&l>=1){ l++; } if(a[i] == 'o'&&l>=2){ cout<<"YES"; return 0; } } cout<<"NO"; return 0; }
------Input------
tbuaekmllmqusxtuhsrarseqdlmuyoiwpvfatvgvnys
------Answer-----
NO
------Your output-----
YES