Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
98379 | Kevin | 如何得到"hello" | C++ | Wrong Answer | 1 MS | 280 KB | 382 | 2024-11-20 15:40:38 |
#include<bits/stdc++.h> using namespace std; int main(){ char a[2000],b[5]={'h','e','l','l','o'},c[10]; gets(a); int len=strlen(a); int m=0,n=0; for(int i=0;i<5;i++){ for(int j=m;j<len;j++){ if(b[i]==a[j]){ c[n++]=a[j]; break; } m++; } } //puts(c); if(strcmp(b,c)==0){ cout<<"YES"; } else{ cout<<"NO"; } return 0; }
------Input------
tbuaekmllmqusxtuhsrarseqdlmuyoiwpvfatvgvnys
------Answer-----
NO
------Your output-----
YES