QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#442142#8524. Weather Forecastucup-team3676#Compile Error//C++141.6kb2024-06-15 09:09:542024-06-15 09:09:54

Details

answer.code:15:28: error: ‘int index [200010]’ redeclared as different kind of entity
   15 | int N, K, arr[MX], index[MX], dp[MX];
      |                            ^
In file included from /usr/include/string.h:432,
                 from /usr/include/c++/13/cstring:42,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:121,
                 from answer.code:1:
/usr/include/strings.h:61:1: note: previous declaration ‘const char* index(const char*, int)’
   61 | index (const char *__s, int __c) __THROW
      | ^~~~~
answer.code: In function ‘int main()’:
answer.code:65:30: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   65 |                         index[cc[i].se] = i;
      |                              ^
answer.code:68:28: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   68 |                 S.upd(index[0], 0);
      |                            ^
answer.code:70:49: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   70 |                         int val = S.que(0, index[i]);
      |                                                 ^
answer.code:73:36: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   73 |                         S.upd(index[i], dp[i]);
      |                                    ^