Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
3460 邓程允 字符串包含判断 C++ Compile Error 0 MS 0 KB 382 2024-06-08 17:11:24

Tests(0/0):


Code:

# include<iostream> using namespace std; int main(){ string a,b,c=""; int f=0; cin>>a>>b; for(int i=0;i<a.size()-b.size();i++){ f=0; for(int j=i,k=0;k<b.size();j++,k++){ if(a[j]!=b[k]){ f=1; break; } } } if(l=1)cout<<"no"; else cout<<"yes"; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=0;i<a.size()-b.size();i++){
                                   ^
Main.cc:9:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int j=i,k=0;k<b.size();j++,k++){
                                  ^
Main.cc:16:8: error: 'l' was not declared in this scope
     if(l=1)cout<<"no";
        ^