Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
105486 罗迎甲 如何得到"hello" C++ Accepted 1 MS 280 KB 537 2025-01-13 17:07:14

Tests(20/20):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a1=0; char s1[1500],s2[100]={'h','e','l','l','o'}; cin>>s1; for(int i=0;i<strlen(s1);i++){ if(s1[i]==s2[a1]){ a1++; } } if(a1==5){ cout<<"YES"; } else { cout<<"NO"; } return 0; }