Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:18:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i=0;i<a.size();i++)
               ~^~~~~~~~~
/in/foo.cc:24:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if(a1+b[i]+a2==b)
     ^~
/in/foo.cc:25:28: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
      cout<<"similar"<<endl;break;
                            ^~~~~
/in/foo.cc:26:5: error: expected '}' before 'else'
     else
     ^~~~
/in/foo.cc:28:6: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
      if(a1+a2==b)
      ^~
/in/foo.cc:29:29: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
       cout<<"similar"<<endl;break;
                             ^~~~~
/in/foo.cc:30:6: error: 'else' without a previous 'if'
      else
      ^~~~
/in/foo.cc: At global scope:
/in/foo.cc:37:2: error: expected unqualified-id before 'return'
  return 0;
  ^~~~~~
/in/foo.cc:38:1: error: expected declaration before '}' token
 }
 ^

信息

递交者
类型
递交
题目
P2628 相似字符串4级1 2024.3
语言
C++
递交时间
2024-06-27 14:10:16
评测时间
2024-06-27 14:10:16
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes