Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
82638 石晋骁 如何得到"hello" C++ Compile Error 0 MS 0 KB 363 2024-07-13 14:31:00

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:5: error: 'in' was not declared in this scope
     in c=0;
     ^
Main.cc:13:7: error: 'c' was not declared in this scope
       c++;
       ^