QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#606439 | #6308. Magic | Derekshakk | Compile Error | / | / | C++17 | 1.8kb | 2024-10-03 08:18:40 | 2024-10-03 08:18:40 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code:7:66: error: ‘int time’ redeclared as different kind of entity 7 | int left[MAX_N], right[MAX_N], n, res, vis[MAX_N], match[MAX_N], time, prevX[MAX_N], prevY[MAX_N]; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/13/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/13/bits/gthr.h:148, from /usr/include/c++/13/ext/atomicity.h:35, from /usr/include/c++/13/bits/ios_base.h:39, from /usr/include/c++/13/streambuf:43, from /usr/include/c++/13/bits/streambuf_iterator.h:35, from /usr/include/c++/13/iterator:66, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:54, from answer.code:1: /usr/include/time.h:75:15: note: previous declaration ‘time_t time(time_t*)’ 75 | extern time_t time (time_t *__timer) __THROW; | ^~~~ answer.code: In function ‘int bfs(int)’: answer.code:14:20: warning: ISO C++ forbids incrementing a pointer of type ‘time_t (*)(time_t*) noexcept’ {aka ‘long int (*)(long int*) noexcept’} [-Wpointer-arith] 14 | vis[start] = ++time; | ^~~~ answer.code:14:20: error: lvalue required as increment operand answer.code:28:48: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 28 | if ((temp = match[v]) && vis[temp] != time) { | ~~~~~~~~~~^~~~~~~ answer.code:30:29: error: invalid conversion from ‘time_t (*)(time_t*) noexcept’ {aka ‘long int (*)(long int*) noexcept’} to ‘int’ [-fpermissive] 30 | vis[temp] = time; | ^~~~ | | | time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept} answer.code: In function ‘int main()’: answer.code:58:16: error: reference to ‘left’ is ambiguous 58 | cin >> left[i] >> right[i]; | ^~~~ /usr/include/c++/13/bits/ios_base.h:1042:3: note: candidates are: ‘std::ios_base& std::left(ios_base&)’ 1042 | left(ios_base& __base) | ^~~~ answer.code:7:5: note: ‘int left [10200]’ 7 | int left[MAX_N], right[MAX_N], n, res, vis[MAX_N], match[MAX_N], time, prevX[MAX_N], prevY[MAX_N]; | ^~~~ answer.code:58:27: error: reference to ‘right’ is ambiguous 58 | cin >> left[i] >> right[i]; | ^~~~~ /usr/include/c++/13/bits/ios_base.h:1050:3: note: candidates are: ‘std::ios_base& std::right(ios_base&)’ 1050 | right(ios_base& __base) | ^~~~~ answer.code:7:18: note: ‘int right [10200]’ 7 | int left[MAX_N], right[MAX_N], n, res, vis[MAX_N], match[MAX_N], time, prevX[MAX_N], prevY[MAX_N]; | ^~~~~ answer.code:64:27: error: reference to ‘left’ is ambiguous 64 | if (i != j && left[i] < left[j] && left[j] < right[i] && right[i] < right[j]) { | ^~~~ /usr/include/c++/13/bits/ios_base.h:1042:3: note: candidates are: ‘std::ios_base& std::left(ios_base&)’ 1042 | left(ios_base& __base) | ^~~~ answer.code:7:5: note: ‘int left [10200]’ 7 | int left[MAX_N], right[MAX_N], n, res, vis[MAX_N], match[MAX_N], time, prevX[MAX_N], prevY[MAX_N]; | ^~~~ answer.code:64:37: error: reference to ‘left’ is ambiguous 64 | if (i != j && left[i] < left[j] && left[j] < right[i] && right[i] < right[j]) { | ^~~~ /usr/include/c++/13/bits/ios_base.h:1042:3: note: candidates are: ‘std::ios_base& std::left(ios_base&)’ 1042 | left(ios_base& __base) | ^~~~ answer.code:7:5: note: ‘int left [10200]’ 7 | int left[MAX_N], right[MAX_N], n, res, vis[MAX_N], match[MAX_N], time, prevX[MAX_N], prevY[MAX_N]; | ^~~~ answer.code:64:48: error: reference to ‘left’ is ambiguous 64 | if (i != j && left[i] < left[j] && left[j] < right[i] && right[i] < right[j]) { | ^~~~ /usr/include/c++/13/bits/ios_base.h:1042:3: note: candidates are: ‘std::ios_base& std::left(ios_base&)’ 1042 | left(ios_base& __base) | ^~~~ answer.code:7:5: note: ‘int left [10200]’ 7 | int left[MAX_N], right[MAX_N], n, res, vis[MAX_N], match[MAX_N], time, prevX[MAX_N], prevY[MAX_N]; | ^~~~ answer.code:64:58: error: reference to ‘right’ is ambiguous 64 | if (i != j && left[i] < left[j] && left[j] < right[i] && right[i] < right[j]) { | ^~~~~ /usr/include/c++/13/bits/ios_base.h:1050:3: note: candidates are: ‘std::ios_base& std::right(ios_base&)’ 1050 | right(ios_base& __base) | ^~~~~ answer.co...