QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#239655#7687. Randias Permutation Taskucup-team314#Compile Error//C++232.0kb2023-11-04 22:16:032023-11-04 22:16:03

Details

answer.code:41:6: error: ambiguating new declaration of ‘void dup(int)’
   41 | void dup (int i) {
      |      ^~~
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:531:12: note: old declaration ‘int dup(int)’
  531 | extern int dup (int __fd) __THROW __wur;
      |            ^~~
answer.code: In function ‘int algo1()’:
answer.code:67:16: warning: ignoring return value of ‘int dup(int)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   67 |             dup(i);
      |             ~~~^~~