QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#254333 | #7748. Karshilov's Matching Problem II | ucup-team881# | Compile Error | / | / | C++20 | 2.4kb | 2023-11-18 11:13:52 | 2023-11-18 11:13:53 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code:16:33: error: ‘long long int link [200005]’ redeclared as different kind of entity 16 | int T, n, w[N], sw[N], m, link[N], pre[N], L[N]; | ^ In file included from /usr/include/c++/11/bits/atomic_wait.h:44, from /usr/include/c++/11/bits/atomic_base.h:41, from /usr/include/c++/11/bits/shared_ptr_atomic.h:33, from /usr/include/c++/11/memory:78, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:82, from answer.code:1: /usr/include/unistd.h:789:12: note: previous declaration ‘int link(const char*, const char*)’ 789 | extern int link (const char *__from, const char *__to) | ^~~~ answer.code: In function ‘int main()’: answer.code:80:57: warning: pointer to a function used in arithmetic [-Wpointer-arith] 80 | while (j && s[i] != s[j]) j = link[j - 1]; | ^ cc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith] answer.code:80:57: error: invalid conversion from ‘int (*)(const char*, const char*) noexcept’ to ‘long long int’ [-fpermissive] 80 | while (j && s[i] != s[j]) j = link[j - 1]; | ~~~~~~~~~~^ | | | int (*)(const char*, const char*) noexcept answer.code:82:23: warning: pointer to a function used in arithmetic [-Wpointer-arith] 82 | link[i] = j; | ^ answer.code:82:25: error: assignment of read-only location ‘*(link + ((sizetype)i))’ 82 | link[i] = j; | ~~~~~~~~^~~