QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#737025 | #7950. Lucky Draws | ZhangYiDe | Compile Error | / | / | C++20 | 1.6kb | 2024-11-12 14:17:50 | 2024-11-12 14:17:51 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code:9:19: error: ‘int dup [10001][10001]’ redeclared as different kind of entity 9 | int n, k, dup[N][N], cnt[N], dp[2][N], pre = 1, cur = 0; | ^ In file included from /usr/include/c++/13/bits/atomic_wait.h:44, from /usr/include/c++/13/bits/atomic_base.h:42, from /usr/include/c++/13/bits/shared_ptr_atomic.h:33, from /usr/include/c++/13/memory:81, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:56, from answer.code:1: /usr/include/unistd.h:531:12: note: previous declaration ‘int dup(int)’ 531 | extern int dup (int __fd) __THROW __wur; | ^~~ answer.code: In function ‘void init()’: answer.code:25:12: warning: pointer to a function used in arithmetic [-Wpointer-arith] 25 | dup[i][j] = st.size(); | ^ answer.code:25:15: warning: pointer to a function used in arithmetic [-Wpointer-arith] 25 | dup[i][j] = st.size(); | ^ answer.code:25:17: error: assignment of read-only location ‘*(dup + (((sizetype)i) + ((sizetype)j)))’ 25 | dup[i][j] = st.size(); | ~~~~~~~~~~^~~~~~~~~~~ answer.code: In function ‘void dnc(int, int, int, int)’: answer.code:35:44: warning: pointer to a function used in arithmetic [-Wpointer-arith] 35 | int val = dp[pre][i] + cnt[mid] - dup[i][mid]; | ^ answer.code:35:49: warning: pointer to a function used in arithmetic [-Wpointer-arith] 35 | int val = dp[pre][i] + cnt[mid] - dup[i][mid]; | ^ answer.code:35:37: error: invalid operands of types ‘int’ and ‘int(int) noexcept’ to binary ‘operator-’ 35 | int val = dp[pre][i] + cnt[mid] - dup[i][mid]; | ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~ | | | | int int(int) noexcept