Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
98377 Kevin 如何得到"hello" C++ Wrong Answer 1 MS 268 KB 370 2024-11-20 15:35:11

Tests(9/20):


Code:

#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++; } } if(strcmp(b,c)==0){ cout<<"YES"; } else{ cout<<"NO"; } return 0; }


Run Info:

------Input------
tbuaekmllmqusxtuhsrarseqdlmuyoiwpvfatvgvnys
------Answer-----
NO
------Your output-----
YES