QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#728002#9570. Binary Treeucup-team5376#Compile Error//C++203.1kb2024-11-09 14:21:052024-11-09 14:21:06

详细

answer.code:18:6: error: ambiguating new declaration of ‘void nice(int)’
   18 | void nice(int  n) {
      |      ^~~~
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:598:12: note: old declaration ‘int nice(int)’
  598 | extern int nice (int __inc) __THROW __wur;
      |            ^~~~
answer.code: In function ‘void cg(int)’:
answer.code:88:17: warning: ignoring return value of ‘int nice(int)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   88 |             nice(n);
      |             ~~~~^~~
answer.code:104:17: warning: ignoring return value of ‘int nice(int)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  104 |             nice(n);
      |             ~~~~^~~
answer.code:108:17: warning: ignoring return value of ‘int nice(int)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  108 |             nice(u);
      |             ~~~~^~~
answer.code:118:13: warning: ignoring return value of ‘int nice(int)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  118 |         nice(n);
      |         ~~~~^~~