QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#89371 | #5821. 交换机 | myd | Compile Error | / | / | C++17 | 1.1kb | 2023-03-19 21:36:39 | 2023-03-19 21:36:42 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
详细
answer.code: In function ‘int main()’: answer.code:33:37: error: reference to ‘hash’ is ambiguous 33 | hs[i + n] = hs[i] = hash(str); | ^~~~ In file included from /usr/include/c++/11/functional:56, from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/11/algorithm:74, from answer.code:3: /usr/include/c++/11/bits/functional_hash.h:59:12: note: candidates are: ‘template<class _Tp> struct std::hash’ 59 | struct hash; | ^~~~ answer.code:21:5: note: ‘int hash(char*)’ 21 | int hash(char *s) { | ^~~~ answer.code:30:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 30 | scanf("%d %d", &n, &k); | ~~~~~^~~~~~~~~~~~~~~~~ answer.code:32:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 32 | scanf("%s %d:%d", str, &a, &b); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~