Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
2727 | 孙浚轩 | 如何得到"hello" | C++ | Wrong Answer | 0 MS | 260 KB | 344 | 2024-01-21 00:29:28 |
#include<iostream> #include<cstring> using namespace std; int main(){ char a[1500],hello[5]={'h','e','l','l','o'}; cin>>a; int i,j=0; for(i=0;i<5;){ while(a[j]!=hello[i]){ if(a[j]=='\0'){ cout<<"NO"; return 0; } j++; } i++; } cout<<"YES"; return 0; }
------Input------
tbuaekmllmqusxtuhsrarseqdlmuyoiwpvfatvgvnys
------Answer-----
NO
------Your output-----
YES