QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#617186#7752. The Only Way to the Destinationucup-team5126#Compile Error//C++172.9kb2024-10-06 14:20:232024-10-06 14:20:23

Details

answer.code:27:31: error: ‘int index [300005]’ redeclared as different kind of entity
   27 | int L[maxn],R[maxn],index[maxn],vis[maxn],flag;
      |                               ^
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:9:
/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 ‘void init()’:
answer.code:62:31: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   62 |         cin>>L[i]>>R[i]>>index[i];
      |                               ^
answer.code:63:24: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   63 |         st.insert(index[i]);
      |                        ^
answer.code:64:17: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   64 |         if(index[i]>1)st.insert(index[i]-1);
      |                 ^
answer.code:64:38: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   64 |         if(index[i]>1)st.insert(index[i]-1);
      |                                      ^
answer.code:65:17: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   65 |         if(index[i]<m)st.insert(index[i]+1);//st记录需要加入的列
      |                 ^
answer.code:65:38: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   65 |         if(index[i]<m)st.insert(index[i]+1);//st记录需要加入的列
      |                                      ^
answer.code:71:22: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   71 |         int col=index[i];
      |                      ^