/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'int constr(int, int)':
foo.cpp:28:17: warning: array subscript has type 'char' [-Wchar-subscripts]
     if (!ch[x][c]) {
                 ^
foo.cpp:31:16: warning: array subscript has type 'char' [-Wchar-subscripts]
         ch[x][c] = count++;
                ^
foo.cpp:33:66: warning: array subscript has type 'char' [-Wchar-subscripts]
     for (; s[i + 1] && s[i + 1] != 'B'; i = constr(i + 1, ch[x][c]));
                                                                  ^
foo.cpp: In function 'int process(int, int)':
foo.cpp:151:34: warning: array subscript has type 'char' [-Wchar-subscripts]
     BIT::modify(Graph::st[ch[x][c]] + 1, 1);
                                  ^
foo.cpp:152:67: warning: array subscript has type 'char' [-Wchar-subscripts]
     for (; s[i + 1] && s[i + 1] != 'B'; i = process(i + 1, ch[x][c]));
                                                                   ^
foo.cpp:157:38: warning: array subscript has type 'char' [-Wchar-subscripts]
         BIT::modify(Graph::st[ch[x][c]] + 1, -1);
                                      ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62:0,
                 from foo.cpp:3:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h: In instantiation of '_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&) [with _RandomAccessIterator = Query*; _Tp = Query]':
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:2307:70:   required from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator) [with _RandomAccessIterator = Query*]'
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:2338:54:   required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size) [with _RandomAccessIterator = Query*; _Size = int]'
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:5475:36:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = Query*]'
foo.cpp:179:23:   required from here
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:2269:19: error: passing 'const Query' as 'this' argument of 'bool Query::operator<(const Query&)' discards qualifiers [-fpermissive]
    while (__pivot < *__last)
                   ^

信息

递交者
类型
递交
题目
P1720 阿狸的打字机
语言
C++
递交时间
2016-09-14 15:06:24
评测时间
2016-09-14 15:06:25
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes