记录详情

Compile Error

foo.cc: In function 'void OutPut(std::vector<bool>&)':
foo.cc:6:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<bool>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    6 |  for(int i=0; i<v.size(); i++)
      |               ~^~~~~~~~~
foo.cc: In function 'void OutPut(std::vector<std::vector<bool> >&)':
foo.cc:13:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<bool> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 |  for(int i=0; i<M.size(); i++)
      |               ~^~~~~~~~~
foo.cc: In function 'int FindMaxLen(std::vector<bool>&)':
foo.cc:23:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<bool>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   23 |  for(int l=0; l<v.size(); l++)
      |               ~^~~~~~~~~
foo.cc:22:6: warning: variable 'maxsi' set but not used [-Wunused-but-set-variable]
   22 |  int maxsi;
      |      ^~~~~
foo.cc: In function 'void LCS(std::string&, std::string)':
foo.cc:66:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<bool>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   66 |   for(int l=0; l<D.size(); l++)
      |                ~^~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:92:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   92 |  for(int i=0;i<=s1.size();i++){
      |              ~^~~~~~~~~~~
foo.cc:93:10: error: could not convert 's1.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   93 |   LCS(s1,char(s1[i]));
      |          ^~~~~~~~~~~
      |          |
      |          __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
比赛
2022暑期青少年社团(训练赛)
语言
C++
递交时间
2022-08-07 21:00:28
评测时间
2022-08-07 21:01:09
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes