Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
82672 石晋骁 如何得到"hello" C++ Accepted 1 MS 276 KB 362 2024-07-13 14:34:14

Tests(20/20):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ string a; string s = "hello"; cin >> a; int al; int c=0; int k=0; al = a.size(); for (int i =0;i < al;i++){ if(a[i] == s[k]){ c++; k++; if( c == 5){ cout << "YES"; return 0; } } } cout << "NO"; return 0; }