记录详情

Compile Error

foo.cc: In member function 'void ds::str::AC_automaton::insert(std::string)':
foo.cc:326:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  326 |         for (int i = 0; i < s.length(); i++) {
      |                         ~~^~~~~~~~~~~~
foo.cc: In member function 'int ds::str::AC_automaton::query(std::string)':
foo.cc:352:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  352 |         for (int i = 0; i < s.length(); i++) {
      |                         ~~^~~~~~~~~~~~
foo.cc: In function 'int ds::main()':
foo.cc:379:15: error: wrong number of template arguments (1, should be 2)
  379 |     ds::ST<int> st(a, n);
      |               ^
foo.cc:76:44: note: provided for 'template<class T, int MAXSIZE> class ds::ST'
   76 | template < typename T, int MAXSIZE > class ST
      |                                            ^~
foo.cc:379:24: error: expression list treated as compound expression in initializer [-fpermissive]
  379 |     ds::ST<int> st(a, n);
      |                        ^
foo.cc:379:20: warning: left operand of comma operator has no effect [-Wunused-value]
  379 |     ds::ST<int> st(a, n);
      |                    ^
foo.cc:387:48: error: request for member 'RMQMIN' in 'st', which is of non-class type 'int'
  387 |             cout << ((a[y] - a[x-1] == 0 && st.RMQMIN(x, y) == 0) ? "Yes" : "No") << '\n';
      |                                                ^~~~~~
foo.cc:390:24: error: request for member 'RMQMIN' in 'st', which is of non-class type 'int'
  390 |             int p = st.RMQMIN(x, y);
      |                        ^~~~~~
foo.cc: At global scope:
foo.cc:404:1: error: expected '}' at end of input
  404 | }
      | ^
foo.cc:74:14: note: to match this '{'
   74 | namespace ds {
      |              ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1300 I. RBS Checking
语言
C++
递交时间
2021-12-23 15:47:56
评测时间
2021-12-23 15:47:56
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes